Files
nextjs-ts/components/elements/types.ts
2026-06-09 15:59:47 -04:00

32 lines
553 B
TypeScript

export type FieldType =
| "text"
| "textarea"
| "color"
| "icon"
| "array"
| "object"
| "boolean"
| "select"
| "image"
| "number"
export interface FieldOption {
label: string
value: string
}
export interface FieldConfig {
type: FieldType
label?: string
options?: FieldOption[]
arrayFields?: Record<string, FieldConfig>
objectFields?: Record<string, FieldConfig>
}
export interface ComponentConfig {
label: string
fields: Record<string, FieldConfig>
}
export type ElementConfig = Record<string, ComponentConfig>