mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
feat(module): devtools integration (#2196)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<!-- eslint-disable vue/block-tag-newline -->
|
||||
<script lang="ts">
|
||||
import { tv, type VariantProps } from 'tailwind-variants'
|
||||
import type { NavigationMenuRootProps, NavigationMenuRootEmits, NavigationMenuContentProps } from 'radix-vue'
|
||||
import type { AppConfig } from '@nuxt/schema'
|
||||
import _appConfig from '#build/app.config'
|
||||
import theme from '#build/ui/navigation-menu'
|
||||
import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
|
||||
import type { AvatarProps, BadgeProps, LinkProps } from '../types'
|
||||
import type { DynamicSlots, MaybeArrayOfArray, MaybeArrayOfArrayItem, PartialString } from '../types/utils'
|
||||
|
||||
@@ -81,6 +81,44 @@ export type NavigationMenuSlots<T extends { slot?: string }> = {
|
||||
'item-content': SlotProps<T>
|
||||
} & DynamicSlots<T, SlotProps<T>>
|
||||
|
||||
extendDevtoolsMeta({
|
||||
ignoreProps: ['items'],
|
||||
defaultProps: {
|
||||
items: [
|
||||
[{
|
||||
label: 'Documentation',
|
||||
icon: 'i-heroicons-book-open',
|
||||
badge: 10,
|
||||
children: [{
|
||||
label: 'Introduction',
|
||||
description: 'Fully styled and customizable components for Nuxt.',
|
||||
icon: 'i-heroicons-home'
|
||||
}, {
|
||||
label: 'Installation',
|
||||
description: 'Learn how to install and configure Nuxt UI in your application.',
|
||||
icon: 'i-heroicons-cloud-arrow-down'
|
||||
}, {
|
||||
label: 'Theming',
|
||||
description: 'Learn how to customize the look and feel of the components.',
|
||||
icon: 'i-heroicons-swatch'
|
||||
}, {
|
||||
label: 'Shortcuts',
|
||||
description: 'Learn how to display and define keyboard shortcuts in your app.',
|
||||
icon: 'i-heroicons-computer-desktop'
|
||||
}]
|
||||
}, {
|
||||
label: 'GitHub',
|
||||
icon: 'i-simple-icons-github',
|
||||
to: 'https://github.com/nuxt/ui',
|
||||
target: '_blank'
|
||||
}, {
|
||||
label: 'Help',
|
||||
icon: 'i-heroicons-question-mark-circle',
|
||||
disabled: true
|
||||
}]
|
||||
]
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<script setup lang="ts" generic="T extends MaybeArrayOfArrayItem<I>, I extends MaybeArrayOfArray<NavigationMenuItem>">
|
||||
|
||||
Reference in New Issue
Block a user