Add Select for option types

This commit is contained in:
ajnart
2023-01-11 08:43:28 +09:00
parent 9f8db259a4
commit 6a3336bd5a
2 changed files with 32 additions and 13 deletions

View File

@@ -34,13 +34,27 @@ export type IWidgetOptionValue =
| ISwitchOptionValue
| ITextInputOptionValue
| ISliderInputOptionValue
| ISelectOptionValue
| INumberInputOptionValue;
// Interface for data type
interface DataType {
label: string
value: string
}
// will show a multi-select with specified data
export type IMultiSelectOptionValue = {
type: 'multi-select';
defaultValue: string[];
data: string[];
data: DataType[];
};
// will show a multi-select with specified data
export type ISelectOptionValue = {
type: 'select';
defaultValue: string;
data: DataType[];
};
// will show a switch