From ce4a18899f24ba89b63ef743476ec0dbf1999ecf Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 3 Nov 2023 23:03:06 +0100 Subject: refactor(components): rewrite SearchForm component * remove searchPage prop (the consumer should handle the submit) * change onSubmit type * use `useForm` hook to handle the form --- src/components/organisms/layout/posts-list.stories.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/components/organisms/layout/posts-list.stories.tsx') diff --git a/src/components/organisms/layout/posts-list.stories.tsx b/src/components/organisms/layout/posts-list.stories.tsx index d56c7e6..b5af1d3 100644 --- a/src/components/organisms/layout/posts-list.stories.tsx +++ b/src/components/organisms/layout/posts-list.stories.tsx @@ -1,6 +1,6 @@ -import { ComponentMeta, ComponentStory } from '@storybook/react'; +import type { ComponentMeta, ComponentStory } from '@storybook/react'; import { PostsList } from './posts-list'; -import { posts, searchPage } from './posts-list.fixture'; +import { posts } from './posts-list.fixture'; /** * PostsList - Storybook Meta @@ -161,7 +161,6 @@ const Template: ComponentStory = (args) => ( export const Default = Template.bind({}); Default.args = { posts, - searchPage, total: posts.length, }; @@ -172,7 +171,6 @@ export const ByYears = Template.bind({}); ByYears.args = { posts, byYear: true, - searchPage, total: posts.length, }; ByYears.decorators = [ @@ -189,6 +187,5 @@ ByYears.decorators = [ export const NoResults = Template.bind({}); NoResults.args = { posts: [], - searchPage, total: posts.length, }; -- cgit v1.2.3