diff --git a/packages/react/src/components/Forms/Examples/ReactHookForm/Login.stories.tsx b/packages/react/src/components/Forms/Examples/ReactHookForm/Login.stories.tsx index b3fcac6..27e6d68 100644 --- a/packages/react/src/components/Forms/Examples/ReactHookForm/Login.stories.tsx +++ b/packages/react/src/components/Forms/Examples/ReactHookForm/Login.stories.tsx @@ -1,7 +1,7 @@ import { yupResolver } from "@hookform/resolvers/yup"; import { Meta } from "@storybook/react"; import React from "react"; -import { useForm } from "react-hook-form"; +import { FormProvider, useForm } from "react-hook-form"; import * as Yup from "yup"; import { RhfInput } from ":/components/Forms/Input/stories-utils"; import { Checkbox } from ":/components/Forms/Checkbox"; @@ -29,7 +29,7 @@ const loginSchema = Yup.object().shape({ }); export const Login = () => { - const { register, handleSubmit, formState } = useForm({ + const methods = useForm({ defaultValues: { email: "", password: "", @@ -41,53 +41,56 @@ export const Login = () => { }); return ( -
-

+ - Log in -

- - -
- + Log in + + -
- -
- You do not have an account?{" "} - - Register - -
- + +
+ +
+ +
+ You do not have an account?{" "} + + Register + +
+ + ); };