docs(ComponentCode): ignore boolean theme variants

This commit is contained in:
Benjamin Canac
2024-12-12 12:08:20 +01:00
parent 7ebd8d813d
commit 3167fda517

View File

@@ -149,7 +149,9 @@ const options = computed(() => {
}))
: prop?.type === 'boolean' || prop?.type === 'boolean | undefined'
? [{ value: true, label: 'true' }, { value: false, label: 'false' }]
: Object.keys(componentTheme?.variants?.[key] || {}).map(variant => ({
: Object.keys(componentTheme?.variants?.[key] || {}).filter((variant) => {
return variant !== 'true' && variant !== 'false'
}).map(variant => ({
value: variant,
label: variant,
chip: key.toLowerCase().endsWith('color') ? { color: variant } : undefined