chore(Range): export RangeColor type

This commit is contained in:
Benjamin Canac
2024-02-15 11:56:40 +01:00
parent c34df13e65
commit b11c773f32
2 changed files with 4 additions and 3 deletions

View File

@@ -26,11 +26,10 @@ import { twMerge, twJoin } from 'tailwind-merge'
import { useUI } from '../../composables/useUI'
import { useFormGroup } from '../../composables/useFormGroup'
import { mergeConfig } from '../../utils'
import type { RangeSize, Strategy } from '../../types'
import type { RangeSize, RangeColor, Strategy } from '../../types'
// @ts-expect-error
import appConfig from '#build/app.config'
import { range } from '#ui/ui.config'
import colors from '#ui-colors'
const config = mergeConfig<typeof range>(appConfig.ui.strategy, appConfig.ui.range, range)
@@ -73,7 +72,7 @@ export default defineComponent({
}
},
color: {
type: String as PropType<typeof colors[number]>,
type: String as PropType<RangeColor>,
default: () => config.default.color,
validator (value: string) {
return appConfig.ui.colors.includes(value)