From 2e0b228aa50f5a10bb68bcbbfef3b7c8ab68ab87 Mon Sep 17 00:00:00 2001 From: Vivian Phung Date: Tue, 14 May 2024 15:55:37 -0400 Subject: [PATCH] [9/n][Storybook] InlineNotification update argTypes and use theme variants --- .../components/shared/InlineNotification/index.ts | 1 + .../Components/InlineNotification.stories.tsx | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/frontend/src/components/shared/InlineNotification/index.ts b/packages/frontend/src/components/shared/InlineNotification/index.ts index fbe7bbd4..fe704ce5 100644 --- a/packages/frontend/src/components/shared/InlineNotification/index.ts +++ b/packages/frontend/src/components/shared/InlineNotification/index.ts @@ -1 +1,2 @@ export * from './InlineNotification'; +export * from './InlineNotification.theme'; diff --git a/packages/frontend/src/stories/Components/InlineNotification.stories.tsx b/packages/frontend/src/stories/Components/InlineNotification.stories.tsx index a96b8f7d..c8484ddd 100644 --- a/packages/frontend/src/stories/Components/InlineNotification.stories.tsx +++ b/packages/frontend/src/stories/Components/InlineNotification.stories.tsx @@ -1,16 +1,19 @@ import { StoryObj, Meta } from '@storybook/react'; + +import { + InlineNotification, + InlineNotificationTheme, +} from 'components/shared/InlineNotification'; import { PlusIcon } from 'components/shared/CustomIcon'; -import { InlineNotification } from 'components/shared/InlineNotification'; - -const inlineNotificationVariants = [ +const inlineNotificationVariants: InlineNotificationTheme['variant'][] = [ 'info', 'danger', 'warning', 'success', 'generic', ]; -const inlineNotificationSizes = ['md', 'sm']; +const inlineNotificationSizes: InlineNotificationTheme['size'][] = ['sm', 'md']; const meta: Meta = { title: 'Components/InlineNotification', @@ -34,6 +37,9 @@ const meta: Meta = { control: 'select', options: inlineNotificationSizes, }, + hasDescription: { + control: 'boolean', + }, }, };