diff --git a/packages/toast/src/Toast.tsx b/packages/toast/src/Toast.tsx
index 17634ab14..886cc4606 100644
--- a/packages/toast/src/Toast.tsx
+++ b/packages/toast/src/Toast.tsx
@@ -12,20 +12,20 @@ const prefersReducedMotion = () => {
const colorForToastType = (type: ToastType) => {
switch (type) {
case ToastType.Success:
- return 'text-success'
+ return 'bg-success text-info-contrast md:text-success'
case ToastType.Error:
- return 'text-danger'
+ return 'bg-danger text-info-contrast md:text-danger'
default:
- return 'text-info'
+ return 'bg-info text-info-contrast md:text-info'
}
}
const iconForToastType = (type: ToastType) => {
switch (type) {
case ToastType.Success:
- return
+ return
case ToastType.Error:
- return
+ return
case ToastType.Progress:
case ToastType.Loading:
return
- {icon ?
{icon}
: null}
-
{toast.message}
+
+ {icon ?
{icon}
: null}
+
{toast.message}
{hasActions && (
-
+ <>
{toast.actions?.map((action, index) => (
+ >
)}
{hasProgress && (
diff --git a/packages/toast/src/ToastContainer.tsx b/packages/toast/src/ToastContainer.tsx
index 769e6ed69..01e6033f6 100644
--- a/packages/toast/src/ToastContainer.tsx
+++ b/packages/toast/src/ToastContainer.tsx
@@ -11,7 +11,7 @@ export const ToastContainer: FunctionComponent = () => {
}
return (
-
+
{toasts.map((toast, index) => (
))}
diff --git a/packages/toast/src/ToastTimer.tsx b/packages/toast/src/ToastTimer.tsx
index e92c7b92b..190c1afbd 100644
--- a/packages/toast/src/ToastTimer.tsx
+++ b/packages/toast/src/ToastTimer.tsx
@@ -55,14 +55,6 @@ export const ToastTimer: FunctionComponent
= ({ toast, index }) => {
resumeTimer()
}, [resumeTimer])
- const handlePageVisibility = useCallback(() => {
- if (document.visibilityState === 'hidden') {
- pauseTimer()
- } else {
- resumeTimer()
- }
- }, [pauseTimer, resumeTimer])
-
const handlePageFocus = useCallback(() => {
resumeTimer()
}, [resumeTimer])
@@ -83,7 +75,6 @@ export const ToastTimer: FunctionComponent = ({ toast, index }) => {
toastElement.addEventListener('mouseenter', handleMouseEnter)
toastElement.addEventListener('mouseleave', handleMouseLeave)
}
- document.addEventListener('visibilitychange', handlePageVisibility)
window.addEventListener('focus', handlePageFocus)
window.addEventListener('blur', handlePageBlur)
@@ -93,7 +84,6 @@ export const ToastTimer: FunctionComponent = ({ toast, index }) => {
toastElement.removeEventListener('mouseenter', handleMouseEnter)
toastElement.removeEventListener('mouseleave', handleMouseLeave)
}
- document.removeEventListener('visibilitychange', handlePageVisibility)
window.removeEventListener('focus', handlePageFocus)
window.removeEventListener('blur', handlePageBlur)
}
@@ -105,7 +95,6 @@ export const ToastTimer: FunctionComponent = ({ toast, index }) => {
handleMouseLeave,
handlePageBlur,
handlePageFocus,
- handlePageVisibility,
resumeTimer,
shouldAutoClose,
toast.id,
diff --git a/packages/web/src/stylesheets/_sn.scss b/packages/web/src/stylesheets/_sn.scss
index d43d6f29c..7962041f5 100644
--- a/packages/web/src/stylesheets/_sn.scss
+++ b/packages/web/src/stylesheets/_sn.scss
@@ -134,7 +134,7 @@
.transparent-info-color-background {
&::after {
- @include DimmedBackground(var(--sn-stylekit-info-color), .12);
+ @include DimmedBackground(var(--sn-stylekit-info-color), 0.12);
border-radius: 100px;
}
}
@@ -142,7 +142,7 @@
.transparent-info-color-background-hover {
&:hover {
&::after {
- @extend .transparent-info-color-background
+ @extend .transparent-info-color-background;
}
}
}