@@ -31,8 +31,9 @@ const component = ({ name, primitive, pro, prose, content }) => {
31
31
? `
32
32
<script lang="ts">
33
33
import type { AppConfig } from '@nuxt/schema'
34
+ ${ pro ? `import type { ComponentConfig } from '@nuxt/ui'` : '' }
34
35
import theme from '#build/${ path } /${ prose ? 'prose/' : '' } ${ content ? 'content/' : '' } ${ kebabName } '
35
- import type { ComponentConfig } from '../types/utils'
36
+ ${ ! pro ? ` import type { ComponentConfig } from '../types/utils'` : '' }
36
37
37
38
type ${ upperName } = ComponentConfig<typeof theme, AppConfig, ${ upperName } ${ pro ? `, '${ key } '` : '' } >
38
39
@@ -62,7 +63,7 @@ defineSlots<${upperName}Slots>()
62
63
63
64
const appConfig = useAppConfig() as ${ upperName } ['AppConfig']
64
65
65
- const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui ?.${ camelName } || {}) })())
66
+ const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.${ pro ? 'uiPro' : 'ui' } ?.${ camelName } || {}) })())
66
67
</script>
67
68
68
69
<template>
@@ -75,8 +76,9 @@ const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.${camelName}
75
76
<script lang="ts">
76
77
import type { ${ upperName } RootProps, ${ upperName } RootEmits } from 'reka-ui'
77
78
import type { AppConfig } from '@nuxt/schema'
79
+ ${ pro ? `import type { ComponentConfig } from '@nuxt/ui'` : '' }
78
80
import theme from '#build/${ path } /${ prose ? 'prose/' : '' } ${ content ? 'content/' : '' } ${ kebabName } '
79
- import type { ComponentConfig } from '../types/utils'
81
+ ${ ! pro ? ` import type { ComponentConfig } from '../types/utils'` : '' }
80
82
81
83
type ${ upperName } = ComponentConfig<typeof theme, AppConfig, ${ upperName } ${ pro ? `, '${ key } '` : '' } >
82
84
@@ -105,7 +107,7 @@ const appConfig = useAppConfig() as ${upperName}['AppConfig']
105
107
106
108
const rootProps = useForwardPropsEmits(reactivePick(props), emits)
107
109
108
- const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui ?.${ camelName } || {}) })())
110
+ const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.${ pro ? 'uiPro' : 'ui' } ?.${ camelName } || {}) })())
109
111
</script>
110
112
111
113
<template>
@@ -186,6 +188,7 @@ links:${primitive
186
188
- label: GitHub
187
189
icon: i-simple-icons-github
188
190
to: https://github.com/nuxt/${ pro ? 'ui-pro' : 'ui' } /tree/v3/src/runtime/components/${ upperName } .vue
191
+ navigation.badge: Soon
189
192
---
190
193
191
194
## Usage
0 commit comments