~ knotless Search/
↑↓ move↵ open⇧↵ all results

johnandersen777.bsky.social/knotless

git that lives in your Atmosphere account

Forked from chadtmiller.com/knotless

0
0
38 lines · 733 B Raw History
<script lang="ts">
	/**
	 * One reaction to something: its `emoji` and how many reacted so,
	 * pressed when one of them is `mine`. Pressing it calls `onclick`, or
	 * opens the popover `target`; `busy` while what it asked is under way.
	 */
	let {
		emoji,
		name,
		count,
		mine = false,
		disabled = false,
		busy = false,
		onclick,
		target
	}: {
		emoji: string;
		name: string;
		count: number;
		mine?: boolean;
		disabled?: boolean;
		busy?: boolean;
		onclick?: () => void;
		target?: string;
	} = $props();
</script>

<button
	class="reaction"
	type="button"
	aria-pressed={mine}
	aria-label="{name}: {count}"
	title={name}
	{disabled}
	aria-busy={busy}
	{onclick}
	popovertarget={target}>{`${emoji} ${count}`}</button
>