@apideck/file-picker
Version:
A React file picker component that works with the Apideck [File Storage API](https://developers.apideck.com/apis/file-storage/reference).
27 lines (26 loc) • 936 B
TypeScript
export interface FormField {
id: string;
label: string;
value: string | string[] | number | boolean | undefined | null;
default_value?: string | string[] | number | boolean | undefined | null;
placeholder: string;
mask: boolean;
type: 'select' | 'multi-select' | 'filtered-select' | 'text' | 'textarea' | 'number' | 'phone' | 'email' | 'url' | 'boolean' | 'hidden' | 'date' | 'datetime' | unknown;
required: boolean;
description?: string;
disabled: boolean;
options: FormFieldOption[] | FormFieldOptionGroup[];
custom_field: boolean;
hidden: boolean;
target?: 'custom_fields' | 'resource';
filter?: Record<string, string>;
}
export interface FormFieldOption {
label: string;
value: string | number | readonly string[] | undefined;
}
export interface FormFieldOptionGroup {
id: string;
label: string;
options: FormFieldOption[];
}