feat(web/m7-377): LikeButton gains size prop (sm/md/lg)
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user