Files
speckle-server/packages/frontend-2/components/viewer/controls/ButtonToggle.vue
T
2025-07-29 23:17:53 +02:00

24 lines
604 B
Vue

<template>
<button
class="transition rounded-md w-8 h-8 shrink-0 flex items-center justify-center outline-none"
:class="
active
? 'bg-info-lighter text-primary-focus dark:text-foreground-on-primary'
: `bg-foundation ${
secondary ? 'text-foreground-3' : 'text-foreground'
} md:hover:bg-primary-muted md:focus-visible:border-foundation`
"
>
<component :is="icon" v-if="icon" class="size-5" />
<slot />
</button>
</template>
<script setup lang="ts">
defineProps<{
active?: boolean
icon?: string
secondary?: boolean
}>()
</script>