fix(components): declare ui prop with PartialString when arrays in theme slots

This commit is contained in:
Benjamin Canac
2024-07-02 15:02:29 +02:00
parent 52146dc260
commit 5cc4457a74
8 changed files with 18 additions and 12 deletions

View File

@@ -4,6 +4,7 @@ import type { SwitchRootProps } from 'radix-vue'
import type { AppConfig } from '@nuxt/schema'
import _appConfig from '#build/app.config'
import theme from '#build/ui/switch'
import type { PartialString } from '../types/utils'
const appConfig = _appConfig as AppConfig & { ui: { switch: Partial<typeof theme> } }
@@ -35,7 +36,7 @@ export interface SwitchProps extends Pick<SwitchRootProps, 'disabled' | 'id' | '
/** The state of the switch when it is initially rendered. Use when you do not need to control its state. */
defaultValue?: boolean
class?: any
ui?: Partial<typeof switchTv.slots>
ui?: PartialString<typeof switchTv.slots>
}
export interface SwitchEmits {