Controlled tabs for Designer

prod
Cagatay Civici 2024-11-13 15:27:37 +03:00
parent 85f9ca0b91
commit dfb1fc18f6
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<Drawer v-model:visible="$appState.designerActive" header="Theme Designer" position="right" class="designer !w-screen md:!w-[48rem]" :modal="false" :dismissable="false"> <Drawer v-model:visible="$appState.designerActive" header="Theme Designer" position="right" class="designer !w-screen md:!w-[48rem]" :modal="false" :dismissable="false">
<Tabs value="0"> <Tabs v-model:value="activeTab">
<TabList> <TabList>
<Tab value="0">Base</Tab> <Tab value="0">Base</Tab>
<Tab value="1">Primitive</Tab> <Tab value="1">Primitive</Tab>
@ -143,6 +143,7 @@
Download Download
</button> </button>
<button <button
v-if="activeTab !== '0'"
type="button" type="button"
@click="apply" @click="apply"
class="px-3 py-2 bg-zinc-950 hover:bg-zinc-800 text-white dark:bg-white dark:hover:bg-gray-100 dark:text-black rounded-md font-medium cursor-pointer transition-colors duration-200 focus:outline focus:outline-offset-2 focus:outline-zinc-950 focus:dark:outline-white" class="px-3 py-2 bg-zinc-950 hover:bg-zinc-800 text-white dark:bg-white dark:hover:bg-gray-100 dark:text-black rounded-md font-medium cursor-pointer transition-colors duration-200 focus:outline focus:outline-offset-2 focus:outline-zinc-950 focus:dark:outline-white"
@ -178,6 +179,7 @@ export default {
}, },
data() { data() {
return { return {
activeTab: '0',
preset: { preset: {
primitive: Aura.primitive, primitive: Aura.primitive,
semantic: Aura.semantic semantic: Aura.semantic