refactor: use react-hook-form in Settings Data Model Object pages (#4271)
Related issue: #3836
This commit is contained in:
@ -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>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user