Merge pull request #285 from bluewave-labs/feat/navigate-back
Added navigation button, resolves #258
This commit is contained in:
2 files changed
+17
-1
No files matched your search
@@ -10,6 +10,7 @@
|
|||||||
font-size: var(--env-var-font-size-large);
|
font-size: var(--env-var-font-size-large);
|
||||||
}
|
}
|
||||||
.create-monitor-form p.MuiTypography-root,
|
.create-monitor-form p.MuiTypography-root,
|
||||||
|
.create-monitor-form button.MuiButtonBase-root,
|
||||||
#monitor-frequencies {
|
#monitor-frequencies {
|
||||||
font-size: var(--env-var-font-size-medium);
|
font-size: var(--env-var-font-size-medium);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import { createMonitorValidation } from "../../Validation/validation";
|
|||||||
import { createMonitor } from "../../Features/Monitors/monitorsSlice";
|
import { createMonitor } from "../../Features/Monitors/monitorsSlice";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
|
import WestRoundedIcon from "@mui/icons-material/WestRounded";
|
||||||
|
|
||||||
const CreateNewMonitor = () => {
|
const CreateNewMonitor = () => {
|
||||||
const MS_PER_MINUTE = 60000;
|
const MS_PER_MINUTE = 60000;
|
||||||
@@ -133,6 +134,20 @@ const CreateNewMonitor = () => {
|
|||||||
padding: `${theme.content.pY} ${theme.content.pX}`,
|
padding: `${theme.content.pY} ${theme.content.pX}`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
<Button
|
||||||
|
level="tertiary"
|
||||||
|
label="Back"
|
||||||
|
img={<WestRoundedIcon />}
|
||||||
|
onClick={() => navigate("/monitors")}
|
||||||
|
sx={{
|
||||||
|
backgroundColor: "#f4f4f4",
|
||||||
|
mb: theme.gap.medium,
|
||||||
|
px: theme.gap.ml,
|
||||||
|
"& svg.MuiSvgIcon-root": {
|
||||||
|
pr: theme.gap.small,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<Typography component="h1">Create new monitor</Typography>
|
<Typography component="h1">Create new monitor</Typography>
|
||||||
<div className="monitors-gaps-medium"></div>
|
<div className="monitors-gaps-medium"></div>
|
||||||
<ConfigBox
|
<ConfigBox
|
||||||
@@ -326,7 +341,7 @@ const CreateNewMonitor = () => {
|
|||||||
MenuProps={{
|
MenuProps={{
|
||||||
PaperProps: {
|
PaperProps: {
|
||||||
style: {
|
style: {
|
||||||
marginTop: "10px"
|
marginTop: "10px",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in new issue
Block a user