Skip to content

Commit

Permalink
remove FilterForm from stories of SearchFormField
Browse files Browse the repository at this point in the history
  • Loading branch information
devgioele committed Sep 11, 2023
1 parent 6066073 commit 84d6f9f
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions src/components/react-hook-form/SearchFormField.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,35 @@ import {
Title,
} from '@storybook/blocks'
import { action } from '@storybook/addon-actions'
import { useForm } from 'react-hook-form'
import {
InternationalizationMessages,
Theme,
} from '../../../.storybook/components'
import { Section, SectionHeaderArea } from '../section'
import { SearchFormField } from './SearchFormField'
import { FilterForm } from './FilterForm'
import { Form } from './Form'

const meta = {
component: SearchFormField,
argTypes: {
disabled: { type: 'boolean' },
},
decorators: [
(Story) => (
<Section>
<SectionHeaderArea>
<FilterForm
defaultValues={{ search: '' }}
onSubmit={action('filter')}
>
<Story />
</FilterForm>
</SectionHeaderArea>
</Section>
),
(Story) => {
const form = useForm({
defaultValues: { search: '' },
})
return (
<Section>
<SectionHeaderArea>
<Form form={form} onSubmit={action('onSubmit')}>
<Story />
</Form>
</SectionHeaderArea>
</Section>
)
},
],
parameters: {
docs: {
Expand Down

0 comments on commit 84d6f9f

Please sign in to comment.