From 4ad9c474668e4b19ab5afc66f24080428b7afa06 Mon Sep 17 00:00:00 2001 From: samshara Date: Tue, 11 Jun 2024 13:01:18 +0545 Subject: [PATCH] refactor: Pager story --- .../src/stories/ProgressBar.tsx | 10 ++++------ .../src/stories/Progressbar.stories.ts | 19 ++++++++++--------- .../go-ui-storybook/src/stories/index.css | 4 ++-- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/packages/go-ui-storybook/src/stories/ProgressBar.tsx b/packages/go-ui-storybook/src/stories/ProgressBar.tsx index 3f2fdf97e..5d0a191a4 100644 --- a/packages/go-ui-storybook/src/stories/ProgressBar.tsx +++ b/packages/go-ui-storybook/src/stories/ProgressBar.tsx @@ -1,15 +1,13 @@ import { ProgressBar as PureProgressBar, - ProgressBarProps as PureProgressBarProps, + ProgressBarProps, } from '@ifrc-go/ui'; -interface ProgressBarProps extends PureProgressBarProps{} - -function WrappedProgressBar(props: ProgressBarProps) { +function ProgressBar(props: ProgressBarProps) { return ( - // eslint-disable-next-line react/jsx-props-no-spreading + // eslint-disable-next-line react/jsx-props-no-spreading ); } -export default WrappedProgressBar; +export default ProgressBar; diff --git a/packages/go-ui-storybook/src/stories/Progressbar.stories.ts b/packages/go-ui-storybook/src/stories/Progressbar.stories.ts index 44e9a6f07..68e330f39 100644 --- a/packages/go-ui-storybook/src/stories/Progressbar.stories.ts +++ b/packages/go-ui-storybook/src/stories/Progressbar.stories.ts @@ -1,3 +1,4 @@ +import { ProgressBarProps } from '@ifrc-go/ui'; import type { Meta, StoryObj, @@ -12,7 +13,7 @@ const meta = { layout: 'centered', design: { type: 'figma', - url: 'https://www.figma.com/file/myeW85ibN5p2SlnXcEpxFD/IFRC-GO---UI-Current---1?type=design&node-id=0-4957&mode=design&t=KwxbuoUQxqcLyZbG-0', + url: 'https://www.figma.com/file/k9SOqgh5jk9PxzuBKdMKsA/IFRC-GO---UI-Library?node-id=14425-221303&t=tvoCZGUCjrbFSV16-4', allowFullscreen: true, }, }, @@ -21,28 +22,28 @@ const meta = { } satisfies Meta; export default meta; -type Story = StoryObj; + +type Story = StoryObj; export const Default: Story = { args: { className: 'progress-bar', - value: 50, - title: 'Total People', - totalValue: 100, - showPercentageInTitle: true, + value: 75, + title: 'Total Projects Completed', + totalValue: 150, }, }; -export const WithTitle : Story = { +export const WithPercentageInTitle: Story = { args: { ...Default.args, - title: 'Total People', + showPercentageInTitle: true, }, }; export const WithDescription: Story = { args: { ...Default.args, - description: 'Loading progress of a file', + description: 'Number of projects completed successfully this year.', }, }; diff --git a/packages/go-ui-storybook/src/stories/index.css b/packages/go-ui-storybook/src/stories/index.css index c8c6db439..49453b923 100644 --- a/packages/go-ui-storybook/src/stories/index.css +++ b/packages/go-ui-storybook/src/stories/index.css @@ -73,5 +73,5 @@ } .progress-bar{ - width:10rem; -} \ No newline at end of file + width:20rem; +}