const componentModule = type.module({
"#accordionItem": {
"title?": "component",
"content?": "component",
},
accordion: {
"...": componentBaseSchema,
type: "'accordion'",
items: "accordionItem[]",
},
button: {
"...": componentBaseSchema.and(mouseEvents),
type: "'button'",
variant:
"'default' | 'secondary' | 'destructive' | 'outline' | 'ghost' | 'link'",
size: "'default' | 'sm' | 'lg' | 'icon' | 'compact'",
"href?": "string",
label: "component",
},
"#tabsItem": {
id: "string",
title: "component",
content: "component",
},
tabs: {
"...": componentBaseSchema,
type: "'tabs'",
"currentTabVariable?": "string",
"onTabChange?": eventHandlersSchema,
items: "tabsItem[]",
},
"#singleComponent":
"string | accordion | button | tabs",
component: "singleComponent | singleComponent[]",
});
const componentSchema = componentModule.component;
const componentModule = type.module({
"#accordionItem": {
"title?": "component",
"content?": "component",
},
accordion: {
"...": componentBaseSchema,
type: "'accordion'",
items: "accordionItem[]",
},
button: {
"...": componentBaseSchema.and(mouseEvents),
type: "'button'",
variant:
"'default' | 'secondary' | 'destructive' | 'outline' | 'ghost' | 'link'",
size: "'default' | 'sm' | 'lg' | 'icon' | 'compact'",
"href?": "string",
label: "component",
},
"#tabsItem": {
id: "string",
title: "component",
content: "component",
},
tabs: {
"...": componentBaseSchema,
type: "'tabs'",
"currentTabVariable?": "string",
"onTabChange?": eventHandlersSchema,
items: "tabsItem[]",
},
"#singleComponent":
"string | accordion | button | tabs",
component: "singleComponent | singleComponent[]",
});
const componentSchema = componentModule.component;