Merged in fix/SW-993-full-width-toast-mobile (pull request #965)

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

Approved-by: Matilda Landström
Approved-by: Chuma Mcphoy (We Ahead)
This commit is contained in:
Christian Andolf
2024-11-26 13:43:03 +00:00
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" import styles from "./toasts.module.css"
export function ToastHandler() { export function ToastHandler() {
return <Toaster position="bottom-right" /> return <Toaster position="bottom-right" duration={5000} />
} }
function getIcon(variant: ToastsProps["variant"]) { function getIcon(variant: ToastsProps["variant"]) {

View File

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

13
package-lock.json generated
View File

@@ -53,7 +53,7 @@
"react-international-phone": "^4.2.6", "react-international-phone": "^4.2.6",
"react-intl": "^6.6.8", "react-intl": "^6.6.8",
"server-only": "^0.0.1", "server-only": "^0.0.1",
"sonner": "^1.5.0", "sonner": "^1.7.0",
"superjson": "^2.2.1", "superjson": "^2.2.1",
"usehooks-ts": "3.1.0", "usehooks-ts": "3.1.0",
"zod": "^3.22.4", "zod": "^3.22.4",
@@ -18205,13 +18205,12 @@
} }
}, },
"node_modules/sonner": { "node_modules/sonner": {
"version": "1.5.0", "version": "1.7.0",
"resolved": "https://registry.npmjs.org/sonner/-/sonner-1.5.0.tgz", "resolved": "https://registry.npmjs.org/sonner/-/sonner-1.7.0.tgz",
"integrity": "sha512-FBjhG/gnnbN6FY0jaNnqZOMmB73R+5IiyYAw8yBj7L54ER7HB3fOSE5OFiQiE2iXWxeXKvg6fIP4LtVppHEdJA==", "integrity": "sha512-W6dH7m5MujEPyug3lpI2l3TC3Pp1+LTgK0Efg+IHDrBbtEjyCmCHHo6yfNBOsf1tFZ6zf+jceWwB38baC8yO9g==",
"license": "MIT",
"peerDependencies": { "peerDependencies": {
"react": "^18.0.0", "react": "^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"react-dom": "^18.0.0" "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-rc"
} }
}, },
"node_modules/sort-object-keys": { "node_modules/sort-object-keys": {

View File

@@ -68,7 +68,7 @@
"react-international-phone": "^4.2.6", "react-international-phone": "^4.2.6",
"react-intl": "^6.6.8", "react-intl": "^6.6.8",
"server-only": "^0.0.1", "server-only": "^0.0.1",
"sonner": "^1.5.0", "sonner": "^1.7.0",
"superjson": "^2.2.1", "superjson": "^2.2.1",
"usehooks-ts": "3.1.0", "usehooks-ts": "3.1.0",
"zod": "^3.22.4", "zod": "^3.22.4",