Radiobox
Interface
export type IRadioboxTypeValue = string;
export interface IRadioboxField extends CommonField {
type: 'radiobox';
options: {
label?: string;
items: {
label: string;
value: string;
disabled?: boolean;
}[];
};
private?: () => Promise<IRadioboxTypeValue>;
render?: (v: IRadioboxTypeValue) => JSX.Element;
validation?: Validation<IRadioboxTypeValue>;
}Example
{
type: 'radiobox',
name: 'YOUR_PATH',
options: {
label: 'Notify me complete...',
items: [
{ value: 'javascript', label: 'JavaScript' },
{ value: 'typescript', label: 'TypeScript' },
{ value: 'python', label: 'Python' }
]
},
validation: z.enum(['javascript', 'typescript', 'python'])
}