From 72496852a5a2ec39af9a889149638d682ed19525 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Mon, 4 May 2026 11:50:31 -0400 Subject: [PATCH] feat(web/m7-377): LikeButton gains size prop (sm/md/lg) --- web/src/lib/components/LikeButton.svelte | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/web/src/lib/components/LikeButton.svelte b/web/src/lib/components/LikeButton.svelte index 774a6887..1f9dcc30 100644 --- a/web/src/lib/components/LikeButton.svelte +++ b/web/src/lib/components/LikeButton.svelte @@ -4,8 +4,13 @@ let { entityType, - entityId - }: { entityType: EntityKind; entityId: string } = $props(); + entityId, + size = 'md' + }: { entityType: EntityKind; entityId: string; size?: 'sm' | 'md' | 'lg' } = $props(); + + const sizeClass = $derived( + size === 'sm' ? 'text-base' : size === 'lg' ? 'text-3xl' : 'text-lg' + ); const SET_KEY = { track: 'track_ids', @@ -39,5 +44,5 @@ aria-label={liked ? 'Unlike' : 'Like'} aria-pressed={liked} onclick={onClick} - class="rounded p-1 {liked ? 'text-accent' : 'text-text-secondary hover:text-text-primary'}" + class="rounded p-1 {sizeClass} {liked ? 'text-accent' : 'text-text-secondary hover:text-text-primary'}" >{liked ? '♥' : '♡'}