TF-102 fixed bug notifications style

This commit is contained in:
AmirHossein Mahmoodi
2023-09-27 10:04:35 +03:30
parent 481c2c02bf
commit f07c5c1b15
4 changed files with 11 additions and 10 deletions

View File

@@ -4,7 +4,7 @@ import {toast} from "react-toastify";
const ErrorNotification = (t, status, message) => {
toast(
({closeToast}) => (
() => (
<>
<Box
sx={{
@@ -36,4 +36,4 @@ const ErrorNotification = (t, status, message) => {
);
};
export default ErrorNotification;
export default ErrorNotification;

View File

@@ -3,9 +3,10 @@ import {toast} from "react-toastify";
const PendingNotification = (t) => {
toast(t("notifications.pending"), {
autoClose: false,
closeButton: false,
closeOnClick: false,
draggable: false,
});
};
export default PendingNotification;
export default PendingNotification;

View File

@@ -39,4 +39,4 @@ const SuccessNotification = (t, status) => {
);
};
export default SuccessNotification;
export default SuccessNotification;

View File

@@ -1,10 +1,10 @@
import ReportIcon from "@mui/icons-material/Report";
import {Box, Divider, Typography} from "@mui/material";
import {Box, Typography} from "@mui/material";
import {toast} from "react-toastify";
const WarningNotification = (t, status) => {
toast(
({closeToast}) => (
() => (
<>
<Box
sx={{
@@ -18,15 +18,15 @@ const WarningNotification = (t, status) => {
<ReportIcon color="warning" sx={{mr: 1.6}}/>
<Box sx={{display: "flex", flexDirection: "column"}}>
<Typography color="warning.main" variant="button">
{t("warning")} ({t("code")}: {status})
{t("notifications.warning")} ({t("notifications.code")}:{" "}
{status})
</Typography>
<Typography variant="caption">
{t("warning_static_text")}
{t("notifications.warning_static_text")}
</Typography>
</Box>
</Box>
</Box>
<Divider sx={{my: 1}}/>
</>
),
{
@@ -37,4 +37,4 @@ const WarningNotification = (t, status) => {
);
};
export default WarningNotification;
export default WarningNotification;