Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter without form #273

Merged
merged 5 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 0 additions & 121 deletions src/components/react-hook-form/FilterForm.stories.mdx

This file was deleted.

83 changes: 0 additions & 83 deletions src/components/react-hook-form/FilterForm.tsx

This file was deleted.

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
Loading