diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-21 18:42:19 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-05-21 19:24:48 +0200 |
| commit | 4581c262ca06704baaa3c0a172d509207f41f5c3 (patch) | |
| tree | 45ef2fe8eafbcb3c54d7e4bee708299da40c715c /src/components/organisms/layout | |
| parent | 0145e687ccd49da08982f6e281ebcbdcb9ef74a7 (diff) | |
chore: complete Storybook stories
Diffstat (limited to 'src/components/organisms/layout')
4 files changed, 58 insertions, 1 deletions
diff --git a/src/components/organisms/layout/comment.stories.tsx b/src/components/organisms/layout/comment.stories.tsx index c31b77a..c7649ab 100644 --- a/src/components/organisms/layout/comment.stories.tsx +++ b/src/components/organisms/layout/comment.stories.tsx @@ -12,6 +12,7 @@ export default { title: 'Organisms/Layout', component: CommentComponent, args: { + canReply: true, saveComment, }, argTypes: { diff --git a/src/components/organisms/layout/comments-list.stories.tsx b/src/components/organisms/layout/comments-list.stories.tsx index 4d95205..1ed159a 100644 --- a/src/components/organisms/layout/comments-list.stories.tsx +++ b/src/components/organisms/layout/comments-list.stories.tsx @@ -1,5 +1,5 @@ import { ComponentMeta, ComponentStory } from '@storybook/react'; -import CommentsListComponent, { Comment } from './comments-list'; +import CommentsListComponent, { type Comment } from './comments-list'; const saveComment = async () => { /** Do nothing. */ @@ -29,6 +29,8 @@ export default { depth: { control: { type: 'number', + min: 0, + max: 4, }, description: 'The maximum depth. Use `0` to not display nested comments.', type: { diff --git a/src/components/organisms/layout/header.stories.tsx b/src/components/organisms/layout/header.stories.tsx index 3ceb337..a5233ea 100644 --- a/src/components/organisms/layout/header.stories.tsx +++ b/src/components/organisms/layout/header.stories.tsx @@ -92,6 +92,16 @@ export default { required: true, }, }, + searchPage: { + control: { + type: 'text', + }, + description: 'The search results page url.', + type: { + name: 'string', + required: true, + }, + }, title: { control: { type: 'text', diff --git a/src/components/organisms/layout/posts-list.stories.tsx b/src/components/organisms/layout/posts-list.stories.tsx index 77318f4..96fb2f0 100644 --- a/src/components/organisms/layout/posts-list.stories.tsx +++ b/src/components/organisms/layout/posts-list.stories.tsx @@ -10,10 +10,26 @@ export default { args: { byYear: false, isLoading: false, + pageNumber: 1, showLoadMoreBtn: false, + siblings: 1, titleLevel: 2, }, argTypes: { + baseUrl: { + control: { + type: 'text', + }, + description: 'The pagination base url.', + table: { + category: 'Options', + defaultValue: { summary: '/page/' }, + }, + type: { + name: 'string', + required: false, + }, + }, byYear: { control: { type: 'boolean', @@ -55,6 +71,20 @@ export default { required: false, }, }, + pageNumber: { + control: { + type: 'number', + }, + description: 'The current page number.', + table: { + category: 'Options', + defaultValue: { summary: 1 }, + }, + type: { + name: 'number', + required: false, + }, + }, posts: { description: 'The posts data.', type: { @@ -77,6 +107,20 @@ export default { required: false, }, }, + siblings: { + control: { + type: 'number', + }, + description: 'The number of page siblings inside pagination.', + table: { + category: 'Options', + defaultValue: { summary: 1 }, + }, + type: { + name: 'number', + required: false, + }, + }, titleLevel: { control: { type: 'number', |
