feat(web/m7-377): LikeButton gains size prop (sm/md/lg)

This commit is contained in:
2026-05-04 11:50:31 -04:00
parent 9eeb79e99f
commit 72496852a5
+8 -3
View File
@@ -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 ? '♥' : '♡'}</button>