feat: using common baseTheme to avoid repetition

This commit is contained in:
Caio Cabral committed 2024-11-08 18:36:43 -05:00
1 parent 9459416fc5
commit d62f5952d5
10 files changed
+135 -33

No files matched your search

+18 -1
View File
@@ -1,5 +1,22 @@
import { Box, Button } from "@mui/material";
import { Heading } from "../../Components/Heading";
function Infrastructure() {
return <h1>Infrastructure monitors</h1>;
return (
<Box component="main">
<Button
variant="contained"
color="primary"
onClick={() => {
// navigate("/monitors/create");
}}
sx={{ fontWeight: 500 }}
>
Create monitor
</Button>
<Heading component="h2">Infrastructure monitors</Heading>
</Box>
);
}
export { Infrastructure };
@@ -1,10 +1,11 @@
import { useTheme } from "@emotion/react";
import { Box, Stack, Typography } from "@mui/material";
import { Box, Stack } from "@mui/material";
import Search from "../../../../Components/Inputs/Search";
import MemoizedMonitorTable from "../MonitorTable";
import { useState } from "react";
import useDebounce from "../../../../Utils/debounce";
import PropTypes from "prop-types";
import { Heading } from "../../../../Components/Heading";
const CurrentMonitoring = ({ totalMonitors, monitors, isAdmin }) => {
const theme = useTheme();
@@ -25,14 +26,8 @@ const CurrentMonitoring = ({ totalMonitors, monitors, isAdmin }) => {
alignItems="center"
mb={theme.spacing(8)}
>
<Typography
component="h2"
variant="h2"
fontWeight={500}
letterSpacing={-0.2}
>
Actively monitoring
</Typography>
<Heading component="h2">Actively monitoring</Heading>
<Box
className="current-monitors-counter"
color={theme.palette.text.primary}
+1
View File
@@ -1,3 +1,4 @@
/* TODO take these from here and declare using emotion. Plus, the values should live in the theme */
.monitors .MuiStack-root > button:not(.MuiIconButton-root) {
font-size: var(--env-var-font-size-medium);
height: var(--env-var-height-2);