fix(SW-993): toast is now full width on mobile

updated sonner to latest version

increased default duration of toast to 5 sec
This commit is contained in:
Christian Andolf
2024-11-22 16:24:51 +01:00
parent b3ab0613f6
commit 257900b7a8
4 changed files with 14 additions and 10 deletions

View File

@@ -16,7 +16,7 @@ import { toastVariants } from "./variants"
import styles from "./toasts.module.css"
export function ToastHandler() {
return <Toaster position="bottom-right" />
return <Toaster position="bottom-right" duration={5000} />
}
function getIcon(variant: ToastsProps["variant"]) {

View File

@@ -6,7 +6,12 @@
background: var(--Base-Surface-Primary-light-Normal);
box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, 0.08);
align-items: center;
width: var(--width);
}
@media screen and (min-width: 768px) {
.toast {
width: var(--width);
}
}
.toast .message {