Add icon support to variant switcher

This commit is contained in:
Dominik Milacher 2025-06-15 15:57:35 +02:00
parent 60f81a1025
commit f79d9e3859
2 changed files with 4 additions and 3 deletions

View File

@ -29,8 +29,8 @@ export default defineNuxtConfig({
websites: {
defaultVariant: 'su',
variants: [
{ code: 'su', name: 'Summer' },
{ code: 'wi', name: 'Winter' }
{ code: 'su', name: 'Summer', icon: 'i-lucide-sun' },
{ code: 'wi', name: 'Winter', icon: 'i-lucide-snowflake'}
]
}
})

View File

@ -12,7 +12,8 @@ const availableVariants = computed(() =>
v-for="variant in availableVariants"
:key="variant.code"
:to="switchVariantPath(variant.code)"
class="flex items-center justify-center"
>
{{ variant.code.toUpperCase() }}
<UIcon :name="variant.icon"/>
</NuxtLink>
</template>