feat(Tabs): new component

This commit is contained in:
Benjamin Canac
2024-03-14 15:20:35 +01:00
parent 6e42ee1e2a
commit 13d389fd39
7 changed files with 255 additions and 1 deletions

View File

@@ -5,7 +5,7 @@ useHead({
}
})
const components = ['avatar', 'badge', 'button', 'chip', 'collapsible', 'kbd', 'popover', 'skeleton', 'tooltip']
const components = ['avatar', 'badge', 'button', 'chip', 'collapsible', 'kbd', 'popover', 'skeleton', 'tabs', 'tooltip']
</script>
<template>

21
playground/pages/tabs.vue Normal file
View File

@@ -0,0 +1,21 @@
<template>
<UTabs :items="items" class="w-96">
<template #tab1="{ item }">
{{ item.label }}
</template>
</UTabs>
</template>
<script setup lang="ts">
const items = [{
label: 'Tab1',
content: 'This is the content shown for Tab1',
slot: 'tab1'
}, {
label: 'Tab2',
content: 'And, this is the content for Tab2'
}, {
label: 'Tab3',
content: 'Finally, this is the content for Tab3'
}]
</script>