diff --git a/web/src/lib/components/reaction/Reaction.svelte b/web/src/lib/components/reaction/Reaction.svelte
index 5f5bff78..fabc6ca2 100644
--- a/web/src/lib/components/reaction/Reaction.svelte
+++ b/web/src/lib/components/reaction/Reaction.svelte
@@ -3,11 +3,12 @@
interface Props {
reaction: ReactionGroup;
+ ontoggle?: () => void; // null for loggedout users
+ pending?: boolean;
}
- let { reaction }: Props = $props();
+ let { reaction, ontoggle, pending = false }: Props = $props();
- // keep the tooltip bounded; overflow becomes "and N more", like the go appview
const MAX_NAMES = 10;
const title = $derived.by(() => {
const shown = reaction.users.slice(0, MAX_NAMES);
@@ -15,16 +16,31 @@
const names = shown.join(", ");
return more > 0 ? `${names}, and ${more} more` : names;
});
+
+ const chipClass = $derived(
+ `flex min-h-6 items-center justify-center gap-1.5 rounded border px-2 text-xs leading-4 text-foreground-default ${
+ reaction.isReacted
+ ? "border-border-strong bg-background-info-subtle"
+ : "border-border-default"
+ }`
+ );
-
- {reaction.kind}
- {reaction.count}
-
+{#if ontoggle}
+
+{:else}
+
+ {reaction.kind}
+ {reaction.count}
+
+{/if}
diff --git a/web/src/lib/components/reaction/ReactionPicker.stories.svelte b/web/src/lib/components/reaction/ReactionPicker.stories.svelte
new file mode 100644
index 00000000..408e6ce0
--- /dev/null
+++ b/web/src/lib/components/reaction/ReactionPicker.stories.svelte
@@ -0,0 +1,26 @@
+
+
+