ledgerrz/resources/js/components/AppearanceTabs.vue
Daan Meijer 4e9e6dce2a
Some checks failed
linter / quality (push) Failing after 1m1s
tests / ci (8.3) (push) Failing after 49s
tests / ci (8.4) (push) Failing after 1m4s
tests / ci (8.5) (push) Failing after 1m4s
front-end restructuring, chat shows message ownership
2026-06-16 14:13:08 +02:00

30 lines
911 B
Vue

<script setup lang="ts">
import { Monitor, Moon, Sun } from '@lucide/vue';
import { useAppearance } from '@/composables/useAppearance';
const { appearance, updateAppearance } = useAppearance();
const tabs = [
{ value: 'light', Icon: Sun, label: 'Light' },
{ value: 'dark', Icon: Moon, label: 'Dark' },
{ value: 'system', Icon: Monitor, label: 'System' },
] as const;
</script>
<template>
<div class="appearance-tabs">
<button
v-for="{ value, Icon, label } in tabs"
:key="value"
@click="updateAppearance(value)"
:class="[
'appearance-tabs__tab',
{ 'appearance-tabs__tab--active': appearance === value },
]"
>
<component :is="Icon" class="appearance-tabs__icon" />
<span class="appearance-tabs__label">{{ label }}</span>
</button>
</div>
</template>