From c1fc5a6ed9f1a83aca9b2a61be77b0378195647b Mon Sep 17 00:00:00 2001 From: Adam Kudrna Date: Thu, 7 Mar 2024 15:47:25 +0100 Subject: [PATCH] fixup! Feat(web): Introduce stacking of the `Toast` queue --- .../src/scss/components/Toast/_ToastBar.scss | 9 ++- .../web/src/scss/components/Toast/index.html | 78 +++++++++++++++++-- 2 files changed, 76 insertions(+), 11 deletions(-) diff --git a/packages/web/src/scss/components/Toast/_ToastBar.scss b/packages/web/src/scss/components/Toast/_ToastBar.scss index 44e06e695d..332bc780e5 100644 --- a/packages/web/src/scss/components/Toast/_ToastBar.scss +++ b/packages/web/src/scss/components/Toast/_ToastBar.scss @@ -48,7 +48,8 @@ margin-inline-end: theme.$bar-action-margin-inline-end; // 4. } -.ToastBar.is-transitioning { +.ToastBar.is-transitioning, +[data-spirit-element='toast-bar'].is-transitioning { @media (prefers-reduced-motion: no-preference) { transition-property: visibility, opacity; transition-duration: theme.$bar-transition-duration; @@ -56,12 +57,14 @@ } } -.ToastBar.is-hidden { +.ToastBar.is-hidden, +[data-spirit-element='toast-bar'].is-hidden { visibility: hidden; opacity: 0; } -.ToastBar.is-visible { +.ToastBar.is-visible, +[data-spirit-element='toast-bar'].is-visible { visibility: visible; opacity: 1; } diff --git a/packages/web/src/scss/components/Toast/index.html b/packages/web/src/scss/components/Toast/index.html index 431ee2e399..51bbaf93d3 100644 --- a/packages/web/src/scss/components/Toast/index.html +++ b/packages/web/src/scss/components/Toast/index.html @@ -87,11 +87,72 @@

Alignment

+ + + + + +
+ Dynamic queue demo: + +
+ +
-
-
+
+
-
+

Alignment

-
+
-
+

Alignment

-
+ -
+