fix(theme): colors autocomplete in app config

This commit is contained in:
Benjamin Canac
2025-06-26 12:18:32 +02:00
parent 6237663a01
commit 752e2b69bd

View File

@@ -158,13 +158,13 @@ import colors from 'tailwindcss/colors'
const icons = ${JSON.stringify(uiConfig.icons)};
type NeutralColor = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone' | (string & {})
type NeutralColor = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone'
type Color = Exclude<keyof typeof colors, 'inherit' | 'current' | 'transparent' | 'black' | 'white' | NeutralColor> | (string & {})
type AppConfigUI = {
colors?: {
${options.theme?.colors?.map(color => `'${color}'?: Color`).join('\n\t\t')}
neutral?: NeutralColor
neutral?: NeutralColor | (string & {})
}
icons?: Partial<typeof icons>
tv?: typeof defaultConfig