({ value, maxLength })
| 12 | } |
| 13 | |
| 14 | const ExampleForm: FC<ExampleFormProps> = ({ value, maxLength }) => { |
| 15 | const form = useFormik({ |
| 16 | initialValues: { |
| 17 | value, |
| 18 | }, |
| 19 | onSubmit: action("submit"), |
| 20 | }); |
| 21 | |
| 22 | const getFieldHelpers = getFormHelpers(form, null); |
| 23 | |
| 24 | return ( |
| 25 | <Form> |
| 26 | <TextField |
| 27 | label="Value" |
| 28 | rows={2} |
| 29 | {...getFieldHelpers("value", { maxLength })} |
| 30 | /> |
| 31 | </Form> |
| 32 | ); |
| 33 | }; |
| 34 | |
| 35 | const meta: Meta<typeof ExampleForm> = { |
| 36 | title: "utilities/getFormHelpers", |
nothing calls this directly
no test coverage detected