Style pin icon more better

This commit is contained in:
mplorentz
2026-04-03 10:01:13 -04:00
parent 54fb24ad29
commit dff9abddf2
2 changed files with 8 additions and 4 deletions
+7 -4
View File
@@ -176,8 +176,6 @@
layout === "default" && "aspect-video w-full min-h-0", layout === "default" && "aspect-video w-full min-h-0",
layout === "strip" && "aspect-video w-44 shrink-0", layout === "strip" && "aspect-video w-44 shrink-0",
tile.source === Track.Source.ScreenShare ? "bg-black" : "bg-base-100", tile.source === Track.Source.ScreenShare ? "bg-black" : "bg-base-100",
$videoPrimaryTileKey === tileKey(tile) &&
"ring-2 ring-primary ring-offset-2 ring-offset-base-300",
)}> )}>
{#if tile.attachable} {#if tile.attachable}
<VideoCallVideo <VideoCallVideo
@@ -195,9 +193,14 @@
{labelFor(tile.identity, tile.source)}{tile.isLocal ? " (you)" : ""} {labelFor(tile.identity, tile.source)}{tile.isLocal ? " (you)" : ""}
</span> </span>
{#if tiles.length > 1} {#if tiles.length > 1}
{@const pinned = $videoPrimaryTileKey === tileKey(tile)}
<Button <Button
data-tip={$videoPrimaryTileKey === tileKey(tile) ? "Exit spotlight" : "Spotlight"} data-tip={pinned ? "Exit spotlight" : "Spotlight"}
class="absolute right-1 top-1 z-20 btn btn-xs btn-circle btn-ghost bg-base-100/70" aria-pressed={pinned}
class={cx(
"absolute right-1 top-1 z-20 btn btn-xs btn-square btn-ghost",
pinned ? "btn-active bg-primary/25 text-primary" : "bg-base-100/70",
)}
onclick={spotlightHandlerFor(tileKey(tile))}> onclick={spotlightHandlerFor(tileKey(tile))}>
<Icon icon={Pin} size={3} /> <Icon icon={Pin} size={3} />
</Button> </Button>
+1
View File
@@ -14,6 +14,7 @@
style?: string style?: string
disabled?: boolean disabled?: boolean
"data-tip"?: string "data-tip"?: string
"aria-pressed"?: boolean
} = $props() } = $props()
const className = $derived(`text-left ${restProps.class}`) const className = $derived(`text-left ${restProps.class}`)