saleor-apps-redis_apl/packages/react-hook-form-macaw/src/stories/Introduction.mdx

18 lines
430 B
Text
Raw Normal View History

import { Meta } from "@storybook/blocks";
<Meta title="Introduction" />
# React Hook Form Macaw
Package contains ready to use bindings to use Macaw with the React Hook Library.
To use it with forms, pass `control` object to the input as in example:
```ts
const { control } = useForm();
<Input control={control} label="Input field" name="name" />;
```
Components will respect default values and error states set by the RHF.