diff --git a/web/src/lib/components/comment/Comment.stories.svelte b/web/src/lib/components/comment/Comment.stories.svelte index 02336f31..1516af70 100644 --- a/web/src/lib/components/comment/Comment.stories.svelte +++ b/web/src/lib/components/comment/Comment.stories.svelte @@ -18,6 +18,7 @@ createdAt: byjp.createdAt, body: byjp.body, bodyHtml: byjp.bodyHtml, + subjectUri: byjp.uri, variant: "top" } }); diff --git a/web/src/lib/components/comment/Comment.svelte b/web/src/lib/components/comment/Comment.svelte index 2d8a8005..a9534a5d 100644 --- a/web/src/lib/components/comment/Comment.svelte +++ b/web/src/lib/components/comment/Comment.svelte @@ -2,6 +2,8 @@ import type { Snippet } from "svelte"; import Avatar from "$lib/components/ui/Avatar.svelte"; import TimeAgo from "$lib/components/ui/TimeAgo.svelte"; + import Reactions from "$lib/components/reaction/Reactions.svelte"; + import type { ReactionGroup } from "$lib/components/reaction/reactions"; interface Props { authorHandle: string; @@ -11,8 +13,9 @@ bodyHtml: string | null; variant?: "top" | "reply"; deleted?: boolean; - // when provided, replaces the body region (e.g. an inline edit form), leaving - // the avatar/handle header untouched so it doesn't shift + reactions?: ReactionGroup[]; + subjectUri: string; + onreactionschange?: (next: ReactionGroup[]) => void; editor?: Snippet; } @@ -24,6 +27,9 @@ bodyHtml, variant = "top", deleted = false, + reactions = [], + subjectUri, + onreactionschange, editor }: Props = $props(); @@ -56,6 +62,9 @@ {:else if body}
{body}
{/if} + {#if !editor} + + {/if} {/if}