|
| 1 | +import { ComponentTypes, ComponentMapper } from '@data-driven-forms/react-form-renderer'; |
| 2 | + |
| 3 | +interface Components { |
| 4 | + TextField: React.ComponentType; |
| 5 | + Textarea: React.ComponentType; |
| 6 | + Select: React.ComponentType; |
| 7 | + Checkbox: React.ComponentType; |
| 8 | + Radio: React.ComponentType; |
| 9 | + Switch: React.ComponentType; |
| 10 | + DatePicker: React.ComponentType; |
| 11 | + TimePicker: React.ComponentType; |
| 12 | + PlainText: React.ComponentType; |
| 13 | + SubForm: React.ComponentType; |
| 14 | + Wizard: React.ComponentType; |
| 15 | + DualListSelect: React.ComponentType; |
| 16 | + Slider: React.ComponentType; |
| 17 | + FueldArray: React.ComponentType; |
| 18 | + Tabs: React.ComponentType; |
| 19 | +} |
| 20 | + |
| 21 | +interface componentMapper extends ComponentMapper { |
| 22 | + [ComponentTypes.TEXT_FIELD]: React.ComponentType; |
| 23 | + [ComponentTypes.TEXTAREA]: React.ComponentType; |
| 24 | + [ComponentTypes.SELECT]: React.ComponentType; |
| 25 | + [ComponentTypes.CHECKBOX]: React.ComponentType; |
| 26 | + [ComponentTypes.SUB_FORM]: React.ComponentType; |
| 27 | + [ComponentTypes.RADIO]: React.ComponentType; |
| 28 | + [ComponentTypes.TABS]: React.ComponentType; |
| 29 | + [ComponentTypes.DATE_PICKER]: React.ComponentType; |
| 30 | + [ComponentTypes.TIME_PICKER]: React.ComponentType; |
| 31 | + [ComponentTypes.SWITCH]: React.ComponentType; |
| 32 | + [ComponentTypes.PLAIN_TEXT]: React.ComponentType; |
| 33 | + [ComponentTypes.WIZARD]: React.ComponentType; |
| 34 | + [ComponentTypes.FIELD_ARRAY]: React.ComponentType; |
| 35 | + [ComponentTypes.DUAL_LIST_SELECT]: React.ComponentType; |
| 36 | + [ComponentTypes.SLIDER]: React.ComponentType; |
| 37 | +} |
| 38 | + |
| 39 | +declare const componentMapper: componentMapper; |
| 40 | + |
| 41 | +export const components: Components; |
| 42 | + |
| 43 | +export default componentMapper; |
0 commit comments