refactor: use react-hook-form in Settings Data Model Object pages (#4271)

Related issue: #3836
This commit is contained in:
Thaïs
2024-03-05 07:52:19 -03:00
committed by GitHub
parent caa4dcf893
commit 91e5e7598b
9 changed files with 338 additions and 267 deletions

View File

@ -0,0 +1,13 @@
import { FormProvider, useForm } from 'react-hook-form';
import { Decorator } from '@storybook/react';
export const FormProviderDecorator: Decorator = (Story) => {
const formConfig = useForm();
return (
// eslint-disable-next-line react/jsx-props-no-spreading
<FormProvider {...formConfig}>
<Story />
</FormProvider>
);
};