frontend/src/lib/components/ControlButton.svelte (view raw)
1 2 3 4 5 6 7 8 9 10 |
<script>
let { icon, highlight, ...rest } = $props();
let color = $derived(highlight ? 'selected' : 'control')
</script>
<div hidden class="fill-control stroke-control fill-selected stroke-selected" />
<button class="w-4 fill-{color} stroke-{color}"
{...rest}>{@html icon}</button>
|