MCPcopy Index your code
hub / github.com/coder/coder / ExampleForm

Function ExampleForm

site/src/utils/formUtils.stories.tsx:14–33  ·  view source on GitHub ↗
({ value, maxLength })

Source from the content-addressed store, hash-verified

12}
13
14const 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
35const meta: Meta<typeof ExampleForm> = {
36 title: "utilities/getFormHelpers",

Callers

nothing calls this directly

Calls 1

getFormHelpersFunction · 0.90

Tested by

no test coverage detected