feat(module): devtools integration (#2196)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Romain Hamel
2024-11-05 22:17:56 +01:00
committed by GitHub
parent 7fc6b387b3
commit 701c75a2a8
100 changed files with 2062 additions and 59 deletions

View File

@@ -1,10 +1,10 @@
<!-- eslint-disable vue/block-tag-newline -->
<script lang="ts">
import { tv, type VariantProps } from 'tailwind-variants'
import type { TabsRootProps, TabsRootEmits, TabsContentProps } from 'radix-vue'
import type { AppConfig } from '@nuxt/schema'
import _appConfig from '#build/app.config'
import theme from '#build/ui/tabs'
import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
import type { AvatarProps } from '../types'
import type { DynamicSlots, PartialString } from '../types/utils'
@@ -65,6 +65,23 @@ export type TabsSlots<T extends { slot?: string }> = {
content: SlotProps<T>
} & DynamicSlots<T, SlotProps<T>>
extendDevtoolsMeta({
defaultProps: {
items: [{
label: 'Tab1',
avatar: { src: 'https://avatars.githubusercontent.com/u/739984?v=4' },
content: 'This is the content shown for Tab1'
}, {
label: 'Tab2',
icon: 'i-heroicons-user',
content: 'And, this is the content for Tab2'
}, {
label: 'Tab3',
icon: 'i-heroicons-bell',
content: 'Finally, this is the content for Tab3'
}]
}
})
</script>
<script setup lang="ts" generic="T extends TabsItem">