From c1339be906f3c36f2f7ea120c4ff696e835c3afe Mon Sep 17 00:00:00 2001 From: sjschlapbach Date: Wed, 4 Sep 2024 16:53:06 +0200 Subject: [PATCH] enhance(Toast): hide dismissible button on toast and show with group hover --- packages/design-system/src/Toast.stories.tsx | 25 ++++++++++++++++---- packages/design-system/src/Toast.tsx | 4 ++-- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/packages/design-system/src/Toast.stories.tsx b/packages/design-system/src/Toast.stories.tsx index 23704400..d8f65aab 100644 --- a/packages/design-system/src/Toast.stories.tsx +++ b/packages/design-system/src/Toast.stories.tsx @@ -111,21 +111,36 @@ export const Error = () => { export const Dismissible = () => { return ( -
-
+
+
Toast components can have an "addimissible" prop set to true. This will set the duration automatically to a minute, but offer an option to the user to manually close the tooltip. Optionally, the duration of a minute can also be overwritten using the duration prop.
+ + Toast Content + + + Toast Content + Toast Content - + + Toast Content + + Toast Content
diff --git a/packages/design-system/src/Toast.tsx b/packages/design-system/src/Toast.tsx index 529da507..bcdf43d9 100644 --- a/packages/design-system/src/Toast.tsx +++ b/packages/design-system/src/Toast.tsx @@ -124,7 +124,7 @@ export function Toast({ {dismissible && (