docs(ComponentProps): update

This commit is contained in:
Benjamin Canac
2024-07-24 16:59:07 +02:00
parent 7757d330b0
commit f1193c35c5

View File

@@ -25,7 +25,7 @@ const metaProps: ComputedRef<ComponentMeta['props']> = computed(() => {
}).map((prop) => {
prop.default = prop.default ?? prop.tags?.find(tag => tag.name === 'defaultValue')?.text ?? componentTheme?.defaultVariants?.[prop.name]
// @ts-expect-error - Type is not correct
prop.type = !['boolean'].includes(prop.type) && prop.schema?.kind === 'enum' && Object.keys(prop.schema.schema)?.length ? Object.values(prop.schema.schema).map(schema => schema?.type ? schema.type : schema).join(' | ') : prop.type
prop.type = !prop.type.startsWith('boolean') && prop.schema?.kind === 'enum' && Object.keys(prop.schema.schema)?.length ? Object.values(prop.schema.schema).map(schema => schema?.type ? schema.type : schema).join(' | ') : prop.type
return prop
}).sort((a, b) => {
if (a.name === 'as') {