chore: Toast responsive width

This commit is contained in:
مهرزاد قدرتی
2025-07-27 15:11:23 +03:30
parent fc5d441712
commit 4f4e7251d6

View File

@@ -9,7 +9,11 @@ export interface ToastProps extends PropsWithChildren {
export const Toast = ({ color, open, onClose, children }: ToastProps) => { export const Toast = ({ color, open, onClose, children }: ToastProps) => {
return ( return (
<Snackbar sx={{ minWidth: '396px' }} open={open} onClose={onClose}> <Snackbar
sx={{ width: (t) => `calc(100% - ${t.spacing(6)})`, maxWidth: '396px' }}
open={open}
onClose={onClose}
>
<Alert <Alert
onClose={onClose} onClose={onClose}
severity={color} severity={color}