From 51d694eac29141fd4f592691c66ce842c1738b06 Mon Sep 17 00:00:00 2001 From: hamo-o Date: Sun, 22 Sep 2024 12:40:11 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20=EC=8A=A4=ED=86=A0=EB=A6=AC=EB=B6=81=20?= =?UTF-8?q?radio=20=EC=98=B5=EC=85=98=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20?= =?UTF-8?q?=EA=B8=B0=EB=B3=B8=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/Toast/Toast.stories.tsx | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/packages/wow-ui/src/components/Toast/Toast.stories.tsx b/packages/wow-ui/src/components/Toast/Toast.stories.tsx index 790ba477..d018c28b 100644 --- a/packages/wow-ui/src/components/Toast/Toast.stories.tsx +++ b/packages/wow-ui/src/components/Toast/Toast.stories.tsx @@ -1,4 +1,4 @@ -import type { Meta } from "@storybook/react"; +import type { Meta, StoryObj } from "@storybook/react"; import { useEffect } from "react"; import { Warn } from "wowds-icons"; @@ -44,7 +44,12 @@ const meta: Meta = { }, type: { description: "Toast의 타입을 나타냅니다.", - control: { type: "radio" }, + table: { + type: { summary: "default | close | arrow" }, + defaultValue: { summary: "default" }, + }, + control: "radio", + options: ["default", "close", "arrow"], }, id: { description: "Toast 컴포넌트의 id를 나타냅니다.", @@ -76,14 +81,15 @@ const meta: Meta = { export default meta; -export const Default = () => { - const { toast } = useToast(); - useEffect(() => { - toast({ - text: "Text", - subText: "subtext", - }); - }, []); +type Story = StoryObj; + +export const Default: Story = { + args: { + id: "1", + text: "Text", + subText: "subtext", + toastDuration: 60 * 60 * 1000, + }, }; export const WithTrigger = () => {