fix toast dimensions issues (#6522)
parent
8aa089efe6
commit
a2e9bf0504
|
@ -11,10 +11,12 @@ type IToast = {
|
||||||
export const SuccessToast = ({ message, toastVisible }: IToast) => (
|
export const SuccessToast = ({ message, toastVisible }: IToast) => (
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
"data-testid-toast-success bg-brand-500 mb-2 flex h-9 items-center space-x-2 rounded-md p-3 text-sm font-semibold text-white shadow-md rtl:space-x-reverse",
|
"data-testid-toast-success bg-brand-500 mb-2 flex h-auto items-center space-x-2 rounded-md p-3 text-sm font-semibold text-white shadow-md rtl:space-x-reverse md:max-w-sm",
|
||||||
toastVisible && "animate-fade-in-up"
|
toastVisible && "animate-fade-in-up"
|
||||||
)}>
|
)}>
|
||||||
<Icon.FiCheck className="h-4 w-4" />
|
<span>
|
||||||
|
<Icon.FiCheck className="h-4 w-4" />
|
||||||
|
</span>
|
||||||
<p>{message}</p>
|
<p>{message}</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -22,10 +24,12 @@ export const SuccessToast = ({ message, toastVisible }: IToast) => (
|
||||||
export const ErrorToast = ({ message, toastVisible }: IToast) => (
|
export const ErrorToast = ({ message, toastVisible }: IToast) => (
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
"animate-fade-in-up mb-2 flex h-9 items-center space-x-2 rounded-md bg-red-100 p-3 text-sm font-semibold text-red-900 shadow-md rtl:space-x-reverse",
|
"animate-fade-in-up mb-2 flex h-auto items-center space-x-2 rounded-md bg-red-100 p-3 text-sm font-semibold text-red-900 shadow-md rtl:space-x-reverse md:max-w-sm",
|
||||||
toastVisible && "animate-fade-in-up"
|
toastVisible && "animate-fade-in-up"
|
||||||
)}>
|
)}>
|
||||||
<Icon.FiInfo className="h-4 w-4" />
|
<span>
|
||||||
|
<Icon.FiInfo className="h-4 w-4" />
|
||||||
|
</span>
|
||||||
<p>{message}</p>
|
<p>{message}</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -33,10 +37,12 @@ export const ErrorToast = ({ message, toastVisible }: IToast) => (
|
||||||
export const WarningToast = ({ message, toastVisible }: IToast) => (
|
export const WarningToast = ({ message, toastVisible }: IToast) => (
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
"animate-fade-in-up bg-brand-500 mb-2 flex h-9 items-center space-x-2 rounded-md p-3 text-sm font-semibold text-white shadow-md rtl:space-x-reverse",
|
"animate-fade-in-up bg-brand-500 mb-2 flex h-auto items-center space-x-2 rounded-md p-3 text-sm font-semibold text-white shadow-md rtl:space-x-reverse md:max-w-sm",
|
||||||
toastVisible && "animate-fade-in-up"
|
toastVisible && "animate-fade-in-up"
|
||||||
)}>
|
)}>
|
||||||
<Icon.FiInfo className="h-4 w-4" />
|
<span>
|
||||||
|
<Icon.FiInfo className="h-4 w-4" />
|
||||||
|
</span>
|
||||||
<p>{message}</p>
|
<p>{message}</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -44,10 +50,12 @@ export const WarningToast = ({ message, toastVisible }: IToast) => (
|
||||||
export const DefaultToast = ({ message, toastVisible }: IToast) => (
|
export const DefaultToast = ({ message, toastVisible }: IToast) => (
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
"animate-fade-in-up bg-brand-500 mb-2 flex h-9 items-center space-x-2 rounded-md p-3 text-sm font-semibold text-white shadow-md rtl:space-x-reverse",
|
"animate-fade-in-up bg-brand-500 mb-2 flex h-auto items-center space-x-2 rounded-md p-3 text-sm font-semibold text-white shadow-md rtl:space-x-reverse md:max-w-sm",
|
||||||
toastVisible && "animate-fade-in-up"
|
toastVisible && "animate-fade-in-up"
|
||||||
)}>
|
)}>
|
||||||
<Icon.FiCheck className="h-4 w-4" />
|
<span>
|
||||||
|
<Icon.FiCheck className="h-4 w-4" />
|
||||||
|
</span>
|
||||||
<p>{message}</p>
|
<p>{message}</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue