mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-30 19:57:55 +01:00
fix(templates): app config colors type
This commit is contained in:
@@ -53,13 +53,13 @@ export function addTemplates(options: ModuleOptions, nuxt: Nuxt) {
|
|||||||
getContents: () => `import * as ui from '#build/ui'
|
getContents: () => `import * as ui from '#build/ui'
|
||||||
import type { DeepPartial } from '#ui/types/utils'
|
import type { DeepPartial } from '#ui/types/utils'
|
||||||
|
|
||||||
const colors = ${JSON.stringify(options.colors)} as const;
|
const colors = ${JSON.stringify(options.theme?.colors || [])} as const;
|
||||||
const icons = ${JSON.stringify(nuxt.options.appConfig.ui.icons)};
|
const icons = ${JSON.stringify(nuxt.options.appConfig.ui.icons)};
|
||||||
|
|
||||||
type AppConfigUI = {
|
type AppConfigUI = {
|
||||||
colors?: {
|
colors?: {
|
||||||
primary?: Exclude<typeof colors[number], 'error'>
|
primary?: Exclude<typeof colors[number], 'error' | 'primary'>
|
||||||
error?: Exclude<typeof colors[number], 'primary'>
|
error?: Exclude<typeof colors[number], 'primary' | 'error'>
|
||||||
gray?: 'slate' | 'cool' | 'zinc' | 'neutral' | 'stone'
|
gray?: 'slate' | 'cool' | 'zinc' | 'neutral' | 'stone'
|
||||||
}
|
}
|
||||||
icons?: Partial<typeof icons>
|
icons?: Partial<typeof icons>
|
||||||
|
|||||||
Reference in New Issue
Block a user