diff --git a/lib/components/toast/toast.component.tsx b/lib/components/toast/toast.component.tsx index 6bce80c..0454fb8 100644 --- a/lib/components/toast/toast.component.tsx +++ b/lib/components/toast/toast.component.tsx @@ -138,7 +138,7 @@ export const ToastComponent = memo((props: ToastComponentProps) => { className={toastClasses} onClose={close} onClick={onClick} - {...(icon ? { icon } : {})} + {...("icon" in props ? { icon } : {})} extra={extra} style={style} /> diff --git a/lib/components/toast/toast.stories.tsx b/lib/components/toast/toast.stories.tsx index 99fe049..2d6e2e0 100644 --- a/lib/components/toast/toast.stories.tsx +++ b/lib/components/toast/toast.stories.tsx @@ -1,12 +1,12 @@ import type { Meta, StoryObj } from "@storybook/react"; -import { Flex } from "../flex/flex"; -import { Button } from "../button/button"; import { ToastComponent, ToastOptions, createStandaloneToast, useToast, } from "."; +import { Button } from "../button/button"; +import { Flex } from "../flex/flex"; const meta = { title: "FEEDBACK/Toast/useToast", diff --git a/package.json b/package.json index 9a9f537..63d9c34 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zeni-ui", "private": false, - "version": "2.1.1", + "version": "2.1.2", "type": "module", "main": "dist/main.js", "types": "dist/main.d.ts",