Mod layout

This commit is contained in:
philipp lang 2024-06-14 01:49:40 +02:00
parent cd057cc52d
commit 335cfc8e9c
2 changed files with 7 additions and 4 deletions

View File

@ -1,10 +1,10 @@
<template> <template>
<box size="sm" class="opacity-[0.8] hover:opacity-[1.0]" :type="type"> <box size="none" class="opacity-[0.8] hover:opacity-[1.0]" :type="type">
<a href="#" @click.prevent="emit('update:model-value', modelValue === index ? -1 : index)" class="flex items-center justify-between"> <a href="#" @click.prevent="emit('update:model-value', modelValue === index ? -1 : index)" class="flex items-center justify-between p-2">
<div v-text="title"></div> <div v-text="title"></div>
<chevron :class="{'rotate-180': modelValue === index}" class="w-4 h-4"></chevron> <chevron :class="{'rotate-180': modelValue === index}" class="w-3 h-3"></chevron>
</a> </a>
<div v-if="modelValue === index"> <div v-if="modelValue === index" class="p-2 pt-0">
<slot /> <slot />
</div> </div>
</box> </box>

View File

@ -42,6 +42,9 @@ const sizes = ref({
sm: { sm: {
container: 'p-2 border', container: 'p-2 border',
}, },
none: {
container: 'border',
},
}); });
const props = defineProps({ const props = defineProps({