Refactored components styling 1/?
This commit is contained in:
1 parent
e72212a467
commit
8b27bc2ab2
20 files changed
+278
-197
No files matched your search
@@ -18,8 +18,10 @@ import { StatusLabel } from "../../../../Components/Label";
|
||||
import ArrowBackRoundedIcon from "@mui/icons-material/ArrowBackRounded";
|
||||
import ArrowForwardRoundedIcon from "@mui/icons-material/ArrowForwardRounded";
|
||||
import { logger } from "../../../../Utils/Logger";
|
||||
import { useTheme } from "@emotion/react";
|
||||
|
||||
const PaginationTable = ({ monitorId, dateRange }) => {
|
||||
const theme = useTheme();
|
||||
const { authToken } = useSelector((state) => state.auth);
|
||||
const [checks, setChecks] = useState([]);
|
||||
const [checksCount, setChecksCount] = useState(0);
|
||||
@@ -78,6 +80,19 @@ const PaginationTable = ({ monitorId, dateRange }) => {
|
||||
page={paginationController.page + 1} //0-indexed
|
||||
onChange={handlePageChange}
|
||||
shape="rounded"
|
||||
sx={{
|
||||
backgroundColor: theme.palette.background.main,
|
||||
border: 1,
|
||||
borderColor: theme.palette.border.light,
|
||||
"& button": {
|
||||
color: theme.palette.text.tertiary,
|
||||
borderRadius: theme.shape.borderRadius,
|
||||
},
|
||||
"& li:first-of-type button, & li:last-of-type button": {
|
||||
border: 1,
|
||||
borderColor: theme.palette.border.light,
|
||||
},
|
||||
}}
|
||||
renderItem={(item) => (
|
||||
<PaginationItem
|
||||
slots={{
|
||||
@@ -93,6 +108,9 @@ const PaginationTable = ({ monitorId, dateRange }) => {
|
||||
pointerEvents: "none",
|
||||
display: "none",
|
||||
},
|
||||
"&.Mui-selected, &.Mui-selected:hover": {
|
||||
backgroundColor: theme.palette.background.fill,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
@@ -102,13 +120,29 @@ const PaginationTable = ({ monitorId, dateRange }) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<TableContainer component={Paper}>
|
||||
<TableContainer
|
||||
component={Paper}
|
||||
sx={{
|
||||
border: `solid 1px ${theme.palette.border.light}`,
|
||||
borderRadius: theme.shape.borderRadius,
|
||||
}}
|
||||
>
|
||||
<Table>
|
||||
<TableHead>
|
||||
<TableHead
|
||||
sx={{
|
||||
backgroundColor: theme.palette.background.accent,
|
||||
}}
|
||||
>
|
||||
<TableRow>
|
||||
<TableCell>Status</TableCell>
|
||||
<TableCell>Date & Time</TableCell>
|
||||
<TableCell>Message</TableCell>
|
||||
<TableCell sx={{ color: theme.palette.text.secondary }}>
|
||||
Status
|
||||
</TableCell>
|
||||
<TableCell sx={{ color: theme.palette.text.secondary }}>
|
||||
Date & Time
|
||||
</TableCell>
|
||||
<TableCell sx={{ color: theme.palette.text.secondary }}>
|
||||
Message
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
<TableBody>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.monitor-details h1.MuiTypography-root {
|
||||
font-size: var(--env-var-font-size-large-plus);
|
||||
color: var(--env-var-color-1);
|
||||
color: var(--primary-color);
|
||||
font-weight: 600;
|
||||
}
|
||||
.monitor-details h2.MuiTypography-root {
|
||||
@@ -11,10 +11,10 @@
|
||||
}
|
||||
.monitor-details h2.MuiTypography-root,
|
||||
.monitor-details h4.MuiTypography-root {
|
||||
color: var(--env-var-color-5);
|
||||
color: var(--secondary-color);
|
||||
}
|
||||
.monitor-details h6.MuiTypography-root {
|
||||
color: var(--env-var-color-3);
|
||||
color: var(--theme-main);
|
||||
}
|
||||
.monitor-details button.MuiButtonBase-root,
|
||||
.monitor-details h4.MuiTypography-root {
|
||||
@@ -29,7 +29,7 @@
|
||||
font-size: var(--env-var-font-size-small-plus);
|
||||
}
|
||||
.monitor-details p.MuiTypography-root {
|
||||
color: var(--env-var-color-2);
|
||||
color: var(--secondary-color-light);
|
||||
}
|
||||
|
||||
.monitor-details .stat-box {
|
||||
@@ -38,7 +38,7 @@
|
||||
border: solid 1px;
|
||||
border-radius: var(--env-var-radius-1);
|
||||
padding: var(--env-var-spacing-1) 16px;
|
||||
background-color: var(--env-var-color-8);
|
||||
background-color: var(--primary-bg);
|
||||
}
|
||||
.monitor-details h6.MuiTypography-root {
|
||||
font-size: var(--env-var-font-size-medium-plus);
|
||||
@@ -46,10 +46,10 @@
|
||||
.monitor-details h6.MuiTypography-root span.MuiTypography-root {
|
||||
font-style: italic;
|
||||
font-size: var(--env-var-font-size-medium);
|
||||
color: var(--env-var-color-5);
|
||||
color: var(--secondary-color);
|
||||
opacity: 0.7;
|
||||
}
|
||||
.monitor-details button.MuiButtonBase-root,
|
||||
.monitor-details .stat-box {
|
||||
border-color: var(--env-var-color-16);
|
||||
border-color: var(--border-color);
|
||||
}
|
||||
@@ -309,11 +309,11 @@ const StatusBox = ({ title, value }) => {
|
||||
position="relative"
|
||||
flex={1}
|
||||
border={1}
|
||||
borderColor={theme.palette.otherColors.graishWhite}
|
||||
borderRadius={`${theme.shape.borderRadius}px`}
|
||||
backgroundColor={theme.palette.otherColors.white}
|
||||
px={theme.gap.large}
|
||||
py={theme.gap.ml}
|
||||
borderColor={theme.palette.border.light}
|
||||
borderRadius={theme.shape.borderRadius}
|
||||
backgroundColor={theme.palette.background.main}
|
||||
px={theme.spacing(12)}
|
||||
py={theme.spacing(8)}
|
||||
overflow="hidden"
|
||||
sx={{
|
||||
"&:hover": {
|
||||
@@ -447,9 +447,7 @@ const Monitors = () => {
|
||||
title: monitor.name,
|
||||
percentage: 100,
|
||||
percentageColor:
|
||||
monitor.status === true
|
||||
? "var(--success-color)"
|
||||
: "var(--error-color)",
|
||||
monitor.status === true ? "var(--success-color)" : "var(--error-color)",
|
||||
status: monitor.status === true ? "up" : "down",
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user