Merge pull request #836 from bluewave-labs/feat/theme-default-font-sizes

Feat/theme default font sizes
This commit is contained in:
Alexander Holliday authored and GitHub committed 2024-09-14 17:23:38 -07:00
commit bd53976bcd
26 files changed
+98 -235

No files matched your search

@@ -11,9 +11,9 @@ import {
import { Box, Stack, Typography } from "@mui/material"; import { Box, Stack, Typography } from "@mui/material";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useMemo } from "react"; import { useMemo } from "react";
import "./index.css";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
import { formatDateWithTz } from "../../../Utils/timeUtils"; import { formatDateWithTz } from "../../../Utils/timeUtils";
import "./index.css";
const CustomToolTip = ({ active, payload, label }) => { const CustomToolTip = ({ active, payload, label }) => {
const uiTimezone = useSelector((state) => state.ui.timezone); const uiTimezone = useSelector((state) => state.ui.timezone);
@@ -97,7 +97,7 @@ const CustomTick = ({ x, y, payload, index }) => {
fontSize={11} fontSize={11}
fontWeight={400} fontWeight={400}
> >
{formatDateWithTz(payload?.value, "HH:mm:ss", uiTimezone)} {formatDateWithTz(payload?.value, "h:mm a", uiTimezone)}
</Text> </Text>
); );
}; };
+2 -1
View File
@@ -121,8 +121,9 @@ const Field = forwardRef(
sx: { sx: {
color: theme.palette.text.secondary, color: theme.palette.text.secondary,
"&:-webkit-autofill": { "&:-webkit-autofill": {
WebkitBoxShadow: `0 0 0 100px ${theme.palette.background.fill} inset`, WebkitBoxShadow: `0 0 0 100px ${theme.palette.other.autofill} inset`,
WebkitTextFillColor: theme.palette.text.secondary, WebkitTextFillColor: theme.palette.text.secondary,
borderRadius: "0 5px 5px 0",
}, },
}, },
}} }}
@@ -1,6 +1,3 @@
.configure-monitor h1.MuiTypography-root + span.MuiTypography-root {
font-size: var(--env-var-font-size-small-plus);
}
.configure-monitor button.MuiButtonBase-root { .configure-monitor button.MuiButtonBase-root {
height: var(--env-var-height-2); height: var(--env-var-height-2);
} }
+3 -13
View File
@@ -223,12 +223,7 @@ const Configure = () => {
> >
<Stack direction="row" gap={theme.spacing(2)}> <Stack direction="row" gap={theme.spacing(2)}>
<Box> <Box>
<Typography <Typography component="h1" variant="h1">
component="h1"
fontSize={22}
fontWeight={500}
color={theme.palette.text.primary}
>
{monitor.name} {monitor.name}
</Typography> </Typography>
<Stack <Stack
@@ -259,17 +254,12 @@ const Configure = () => {
/> />
</Box> </Box>
</Tooltip> </Tooltip>
<Typography <Typography component="h2" variant="h2">
component="h2"
fontSize={14.5}
color={theme.palette.text.secondary}
>
{monitor.url?.replace(/^https?:\/\//, "") || "..."} {monitor.url?.replace(/^https?:\/\//, "") || "..."}
</Typography> </Typography>
<Typography <Typography
position="relative" position="relative"
fontSize={12} variant="body2"
color={theme.palette.text.tertiary}
ml={theme.spacing(6)} ml={theme.spacing(6)}
mt={theme.spacing(1)} mt={theme.spacing(1)}
sx={{ sx={{
@@ -1,7 +1,3 @@
.create-monitor h1.MuiTypography-root {
font-size: var(--env-var-font-size-large-plus);
font-weight: 500;
}
.create-monitor p.MuiTypography-root, .create-monitor p.MuiTypography-root,
.create-monitor button.MuiButtonBase-root { .create-monitor button.MuiButtonBase-root {
font-size: var(--env-var-font-size-medium); font-size: var(--env-var-font-size-medium);
@@ -177,14 +177,7 @@ const CreateMonitor = () => {
]; ];
return ( return (
<Box <Box className="create-monitor">
className="create-monitor"
sx={{
"& h1": {
color: theme.palette.text.primary,
},
}}
>
<Breadcrumbs <Breadcrumbs
list={[ list={[
{ name: "monitors", path: "/monitors" }, { name: "monitors", path: "/monitors" },
@@ -200,15 +193,16 @@ const CreateMonitor = () => {
gap={theme.spacing(12)} gap={theme.spacing(12)}
mt={theme.spacing(6)} mt={theme.spacing(6)}
> >
<Typography component="h1"> <Typography component="h1" variant="h1">
<Typography <Typography component="span" fontSize="inherit">
component="span"
fontSize="inherit"
color={theme.palette.text.secondary}
>
Create your{" "} Create your{" "}
</Typography> </Typography>
<Typography component="span" fontSize="inherit" fontWeight="inherit"> <Typography
component="span"
variant="h2"
fontSize="inherit"
fontWeight="inherit"
>
monitor monitor
</Typography> </Typography>
</Typography> </Typography>
@@ -262,7 +256,7 @@ const CreateMonitor = () => {
onChange={(event) => handleChange(event)} onChange={(event) => handleChange(event)}
/> />
{monitor.type === "http" ? ( {monitor.type === "http" ? (
<ButtonGroup sx={{ ml: "32px" }}> <ButtonGroup sx={{ ml: theme.spacing(16) }}>
<Button <Button
variant="group" variant="group"
filled={https.toString()} filled={https.toString()}
+6 -18
View File
@@ -139,12 +139,7 @@ const DetailsPage = ({ isAdmin }) => {
<Stack gap={theme.spacing(10)} mt={theme.spacing(10)}> <Stack gap={theme.spacing(10)} mt={theme.spacing(10)}>
<Stack direction="row" gap={theme.spacing(2)}> <Stack direction="row" gap={theme.spacing(2)}>
<Box> <Box>
<Typography <Typography component="h1" variant="h1">
component="h1"
fontSize={22}
fontWeight={500}
color={theme.palette.text.primary}
>
{monitor.name} {monitor.name}
</Typography> </Typography>
<Stack <Stack
@@ -173,19 +168,14 @@ const DetailsPage = ({ isAdmin }) => {
<PulseDot color={statusColor[determineState(monitor)]} /> <PulseDot color={statusColor[determineState(monitor)]} />
</Box> </Box>
</Tooltip> </Tooltip>
<Typography <Typography component="h2" variant="h2">
component="h2"
fontSize={14.5}
color={theme.palette.text.secondary}
>
{monitor.url?.replace(/^https?:\/\//, "") || "..."} {monitor.url?.replace(/^https?:\/\//, "") || "..."}
</Typography> </Typography>
<Typography <Typography
position="relative"
variant="body2"
mt={theme.spacing(1)} mt={theme.spacing(1)}
ml={theme.spacing(6)} ml={theme.spacing(6)}
fontSize={12}
position="relative"
color={theme.palette.text.tertiary}
sx={{ sx={{
"&:before": { "&:before": {
position: "absolute", position: "absolute",
@@ -254,9 +244,7 @@ const DetailsPage = ({ isAdmin }) => {
}, },
}} }}
> >
<Typography fontSize={12} color={theme.palette.text.tertiary}> <Typography variant="body2">Certificate Expiry</Typography>
Certificate Expiry
</Typography>
<Typography <Typography
component="span" component="span"
fontSize={13} fontSize={13}
@@ -315,7 +303,7 @@ const DetailsPage = ({ isAdmin }) => {
gap={theme.spacing(4)} gap={theme.spacing(4)}
mb={theme.spacing(8)} mb={theme.spacing(8)}
> >
<Typography fontSize={12} color={theme.palette.text.tertiary}> <Typography variant="body2">
Showing statistics for past{" "} Showing statistics for past{" "}
{dateRange === "day" {dateRange === "day"
? "24 hours" ? "24 hours"
@@ -272,13 +272,8 @@ const MonitorTable = ({ isAdmin }) => {
alignItems="center" alignItems="center"
justifyContent="space-between" justifyContent="space-between"
px={theme.spacing(4)} px={theme.spacing(4)}
sx={{
"& p": {
color: theme.palette.text.tertiary,
},
}}
> >
<Typography px={theme.spacing(2)} fontSize={12} sx={{ opacity: 0.7 }}> <Typography px={theme.spacing(2)} variant="body2" sx={{ opacity: 0.7 }}>
Showing {getRange()} of {monitorCount} monitor(s) Showing {getRange()} of {monitorCount} monitor(s)
</Typography> </Typography>
<TablePagination <TablePagination
@@ -91,6 +91,7 @@ const ActionsMenu = ({ monitor, isAdmin, updateCallback }) => {
anchorEl={anchorEl} anchorEl={anchorEl}
open={Boolean(anchorEl)} open={Boolean(anchorEl)}
onClose={(e) => closeMenu(e)} onClose={(e) => closeMenu(e)}
disableScrollLock
slotProps={{ slotProps={{
paper: { paper: {
sx: { sx: {
@@ -176,7 +177,6 @@ const ActionsMenu = ({ monitor, isAdmin, updateCallback }) => {
> >
<Stack <Stack
gap={theme.spacing(2)} gap={theme.spacing(2)}
color={theme.palette.text.secondary}
sx={{ sx={{
position: "absolute", position: "absolute",
top: "50%", top: "50%",
@@ -194,10 +194,10 @@ const ActionsMenu = ({ monitor, isAdmin, updateCallback }) => {
}, },
}} }}
> >
<Typography id="modal-delete-monitor" component="h2" fontWeight={600}> <Typography id="modal-delete-monitor" component="h2" variant="h2">
Do you really want to delete this monitor? Do you really want to delete this monitor?
</Typography> </Typography>
<Typography id="delete-monitor-confirmation" fontSize={13}> <Typography id="delete-monitor-confirmation" variant="body1">
Once deleted, this monitor cannot be retrieved. Once deleted, this monitor cannot be retrieved.
</Typography> </Typography>
<Stack <Stack
+4 -2
View File
@@ -18,8 +18,10 @@ const Fallback = ({ isAdmin }) => {
borderColor={theme.palette.border.light} borderColor={theme.palette.border.light}
color={theme.palette.text.secondary} color={theme.palette.text.secondary}
> >
<Typography component="h2">No monitors found</Typography> <Typography component="h2" variant="h2" fontWeight={500}>
<Typography> No monitors found
</Typography>
<Typography variant="body1">
It looks like you don’t have any monitors set up yet. It looks like you don’t have any monitors set up yet.
</Typography> </Typography>
{isAdmin && ( {isAdmin && (
-11
View File
@@ -1,14 +1,3 @@
.monitors h1.MuiTypography-root {
font-size: var(--env-var-font-size-large-plus);
font-weight: 500;
}
.monitors h2.MuiTypography-root {
font-size: var(--env-var-font-size-large);
font-weight: 500;
}
.monitors h1.MuiTypography-root + p.MuiTypography-root {
font-size: var(--env-var-font-size-medium-plus);
}
.monitors .MuiStack-root > button:not(.MuiIconButton-root) { .monitors .MuiStack-root > button:not(.MuiIconButton-root) {
font-size: var(--env-var-font-size-medium); font-size: var(--env-var-font-size-medium);
height: var(--env-var-height-2); height: var(--env-var-height-2);
+1 -5
View File
@@ -96,11 +96,7 @@ const Monitors = ({ isAdmin }) => {
alignItems="center" alignItems="center"
mb={theme.spacing(8)} mb={theme.spacing(8)}
> >
<Typography <Typography component="h2" variant="h2" letterSpacing={-0.5}>
component="h2"
color={theme.palette.text.secondary}
letterSpacing={-0.5}
>
Actively monitoring Actively monitoring
</Typography> </Typography>
<Box <Box
+1 -9
View File
@@ -24,15 +24,7 @@ const SkeletonLayout = () => {
<Skeleton variant="rounded" width="100%" height={100} /> <Skeleton variant="rounded" width="100%" height={100} />
<Skeleton variant="rounded" width="100%" height={100} /> <Skeleton variant="rounded" width="100%" height={100} />
</Stack> </Stack>
<Stack <Skeleton variant="rounded" width="100%" height="100%" flex={1} />
gap={theme.spacing(12)}
p={theme.spacing(20)}
backgroundColor="#f9fafb"
>
<Skeleton variant="rounded" width="50%" height={25} />
<Skeleton variant="rounded" width="100%" height={300} />
<Skeleton variant="rounded" width="100%" height={100} />
</Stack>
</> </>
); );
}; };
+3 -7
View File
@@ -36,16 +36,12 @@ const NotFound = ({ title = DefaultValue.title, desc = DefaultValue.desc }) => {
return ( return (
<Stack height="100vh" justifyContent="center"> <Stack height="100vh" justifyContent="center">
<Stack <Stack gap={theme.spacing(2)} alignItems="center">
gap={theme.spacing(2)}
alignItems="center"
color={theme.palette.text.secondary}
>
<img src={NotFoundSvg} alt="404" style={{ maxHeight: "25rem" }} /> <img src={NotFoundSvg} alt="404" style={{ maxHeight: "25rem" }} />
<Typography component="h1" fontSize={16} fontWeight={600}> <Typography component="h1" variant="h1" fontSize={16}>
{title} {title}
</Typography> </Typography>
<Typography fontSize={13}>{desc}</Typography> <Typography variant="body1">{desc}</Typography>
<Button <Button
variant="contained" variant="contained"
color="primary" color="primary"
+2 -12
View File
@@ -1,18 +1,8 @@
.configure-pagespeed h1.MuiTypography-root {
font-size: var(--env-var-font-size-large-plus);
}
.configure-pagespeed span.MuiTypography-root { .configure-pagespeed span.MuiTypography-root {
font-size: var(--env-var-font-size-small-plus); font-size: var(--env-var-font-size-small-plus);
} }
.configure-pagespeed h1.MuiTypography-root, .configure-pagespeed h3.MuiTypography-root {
.configure-pagespeed h3.MuiTypography-root, font-weight: 500;
.configure-pagespeed h2.MuiTypography-root {
font-weight: 600;
}
.configure-pagespeed p.MuiTypography-root,
.configure-pagespeed h3.MuiTypography-root,
.configure-pagespeed h3.MuiTypography-root > span.MuiTypography-root {
font-size: var(--env-var-font-size-medium);
} }
.configure-pagespeed .MuiBox-root > .field + p.MuiTypography-root { .configure-pagespeed .MuiBox-root > .field + p.MuiTypography-root {
font-size: var(--env-var-font-size-small-plus); font-size: var(--env-var-font-size-small-plus);
@@ -151,12 +151,7 @@ const PageSpeedConfigure = () => {
<Stack direction="row" gap={theme.spacing(2)}> <Stack direction="row" gap={theme.spacing(2)}>
<PulseDot color={statusColor[determineState(monitor)]} /> <PulseDot color={statusColor[determineState(monitor)]} />
<Box> <Box>
<Typography <Typography component="h1" variant="h1" mb={theme.spacing(2)}>
component="h1"
mb={theme.spacing(2)}
sx={{ lineHeight: 1 }}
color={theme.palette.text.primary}
>
{monitor?.url} {monitor?.url}
</Typography> </Typography>
<Typography <Typography
@@ -351,13 +346,13 @@ const PageSpeedConfigure = () => {
<Typography <Typography
id="modal-delete-pagespeed-monitor" id="modal-delete-pagespeed-monitor"
component="h2" component="h2"
color={theme.palette.text.secondary} variant="h2"
> >
Do you really want to delete this monitor? Do you really want to delete this monitor?
</Typography> </Typography>
<Typography <Typography
id="delete-pagespeed-monitor-confirmation" id="delete-pagespeed-monitor-confirmation"
color={theme.palette.text.tertiary} variant="body1"
> >
Once deleted, this monitor cannot be retrieved. Once deleted, this monitor cannot be retrieved.
</Typography> </Typography>
@@ -1,43 +0,0 @@
.create-page-speed h1.MuiTypography-root,
.create-page-speed h3.MuiTypography-root {
font-weight: 600;
}
.create-page-speed p.MuiTypography-root,
.create-page-speed h3.MuiTypography-root,
.create-page-speed h3.MuiTypography-root > span.MuiTypography-root {
font-size: var(--env-var-font-size-medium);
}
.create-page-speed .MuiBox-root > .field + p.MuiTypography-root {
font-size: var(--env-var-font-size-small-plus);
}
.create-page-speed .MuiBox-root > .field + p.MuiTypography-root,
.create-page-speed h3.MuiTypography-root > span.MuiTypography-root {
opacity: 0.6;
}
.create-page-speed .checkbox-wrapper {
margin-bottom: 1px;
}
/* to be removed */
.create-page-speed .section-disabled {
opacity: 0.4;
padding: 10px;
margin-right: -5px;
border-radius: 8px;
user-select: none;
pointer-events: none;
}
.create-page-speed button {
height: var(--env-var-height-2);
}
.create-page-speed h3.MuiTypography-root {
flex: 0.7;
}
.create-page-speed .field,
.create-page-speed .section-disabled,
.create-page-speed .select-wrapper {
flex: 1;
}
@@ -164,16 +164,17 @@ const CreatePageSpeed = () => {
gap={theme.spacing(12)} gap={theme.spacing(12)}
mt={theme.spacing(6)} mt={theme.spacing(6)}
> >
<Typography component="h1"> <Typography component="h1" variant="h1">
<Typography component="span" fontSize="inherit">
Create your{" "}
</Typography>
<Typography <Typography
component="span" component="span"
fontSize="inherit" fontSize="inherit"
fontWeight="inherit"
color={theme.palette.text.secondary} color={theme.palette.text.secondary}
> >
Create your{" "} pagespeed monitor
</Typography>
<Typography component="span" fontSize="inherit" fontWeight="inherit">
Pagespeed monitor
</Typography> </Typography>
</Typography> </Typography>
<ConfigBox> <ConfigBox>
@@ -11,7 +11,8 @@ import {
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useMemo } from "react"; import { useMemo } from "react";
import { Box, Stack, Typography } from "@mui/material"; import { Box, Stack, Typography } from "@mui/material";
import { formatDate } from "../../../../Utils/timeUtils"; import { formatDateWithTz } from "../../../../Utils/timeUtils";
import { useSelector } from "react-redux";
const config = { const config = {
seo: { seo: {
@@ -47,7 +48,8 @@ const config = {
const CustomToolTip = ({ active, payload, label, config }) => { const CustomToolTip = ({ active, payload, label, config }) => {
const theme = useTheme(); const theme = useTheme();
console.log(payload); const uiTimezone = useSelector((state) => state.ui.timezone);
if (active && payload && payload.length) { if (active && payload && payload.length) {
return ( return (
<Box <Box
@@ -67,7 +69,7 @@ const CustomToolTip = ({ active, payload, label, config }) => {
fontWeight: 500, fontWeight: 500,
}} }}
> >
{formatDate(new Date(label))} {formatDateWithTz(label, "ddd, MMMM D, YYYY, h:mm A", uiTimezone)}
</Typography> </Typography>
{Object.keys(config) {Object.keys(config)
.reverse() .reverse()
@@ -176,6 +178,7 @@ const processDataWithGaps = (data, interval) => {
*/ */
const CustomTick = ({ x, y, payload, index }) => { const CustomTick = ({ x, y, payload, index }) => {
const theme = useTheme(); const theme = useTheme();
const uiTimezone = useSelector((state) => state.ui.timezone);
// Render nothing for the first tick // Render nothing for the first tick
if (index === 0) return null; if (index === 0) return null;
@@ -189,11 +192,7 @@ const CustomTick = ({ x, y, payload, index }) => {
fontSize={11} fontSize={11}
fontWeight={400} fontWeight={400}
> >
{formatDate(new Date(payload.value), { {formatDateWithTz(payload?.value, "h:mm a", uiTimezone)}
year: undefined,
month: undefined,
day: undefined,
})}
</Text> </Text>
); );
}; };
+8 -26
View File
@@ -99,12 +99,7 @@ const PageSpeedDetails = () => {
/> />
<Stack direction="row" gap={theme.spacing(2)}> <Stack direction="row" gap={theme.spacing(2)}>
<Box> <Box>
<Typography <Typography component="h1" variant="h1">
component="h1"
fontSize={22}
fontWeight={500}
color={theme.palette.text.primary}
>
{monitor.name} {monitor.name}
</Typography> </Typography>
<Stack <Stack
@@ -143,19 +138,14 @@ const PageSpeedDetails = () => {
/> />
</Box> </Box>
</Tooltip> </Tooltip>
<Typography <Typography component="h2" variant="h2">
component="h2"
fontSize={14.5}
color={theme.palette.text.secondary}
>
{monitor?.url} {monitor?.url}
</Typography> </Typography>
<Typography <Typography
position="relative"
variant="body2"
mt={theme.spacing(1)} mt={theme.spacing(1)}
ml={theme.spacing(6)} ml={theme.spacing(6)}
fontSize={12}
position="relative"
color={theme.palette.text.tertiary}
sx={{ sx={{
"&:before": { "&:before": {
position: "absolute", position: "absolute",
@@ -212,11 +202,7 @@ const PageSpeedDetails = () => {
</StatBox> </StatBox>
</Stack> </Stack>
<Box> <Box>
<Typography <Typography variant="body2" my={theme.spacing(8)}>
fontSize={12}
color={theme.palette.text.tertiary}
my={theme.spacing(8)}
>
Showing statistics for past 24 hours. Showing statistics for past 24 hours.
</Typography> </Typography>
<ChartBox sx={{ gridTemplateColumns: "75% 25%" }}> <ChartBox sx={{ gridTemplateColumns: "75% 25%" }}>
@@ -308,7 +294,7 @@ const PageSpeedDetails = () => {
pb={theme.spacing(12)} pb={theme.spacing(12)}
> >
<PieChart audits={audits} /> <PieChart audits={audits} />
<Typography fontSize={13} mt="auto"> <Typography variant="body1" mt="auto">
Values are estimated and may vary.{" "} Values are estimated and may vary.{" "}
<Typography <Typography
component="span" component="span"
@@ -393,14 +379,10 @@ const PageSpeedDetails = () => {
component="span" component="span"
fontSize={14} fontSize={14}
fontWeight={500} fontWeight={500}
color={theme.palette.text.primary}
> >
{value} {value}
<Typography <Typography component="span" variant="body2" ml={2}>
component="span"
fontSize={12}
color={theme.palette.text.tertiary}
ml={2}
>
{unit} {unit}
</Typography> </Typography>
</Typography> </Typography>
+12 -2
View File
@@ -3,6 +3,8 @@ import { StatusLabel } from "../../Components/Label";
import { Box, Grid, Stack, Typography } from "@mui/material"; import { Box, Grid, Stack, Typography } from "@mui/material";
import { useNavigate } from "react-router"; import { useNavigate } from "react-router";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { formatDate, formatDurationRounded } from "../../Utils/timeUtils";
import { getLastChecked } from "../../Utils/monitorUtils";
import useUtils from "../Monitors/utils"; import useUtils from "../Monitors/utils";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
@@ -44,6 +46,7 @@ const Card = ({ monitor }) => {
<Typography <Typography
component="h2" component="h2"
mb={theme.spacing(2)} mb={theme.spacing(2)}
fontSize={16}
color={theme.palette.primary.main} color={theme.palette.primary.main}
> >
{monitor.name} {monitor.name}
@@ -54,8 +57,15 @@ const Card = ({ monitor }) => {
customStyles={{ textTransform: "capitalize" }} customStyles={{ textTransform: "capitalize" }}
/> />
</Stack> </Stack>
<Typography fontSize={13}> <Typography>{monitor.url.replace(/^https?:\/\//, "")}</Typography>
{monitor.url.replace(/^https?:\/\//, "")} <Typography mt={theme.spacing(12)}>
<Typography component="span" variant="body2" fontWeight={600}>
Last checked:{" "}
</Typography>
{formatDate(getLastChecked(monitor.checks, false))}{" "}
<Typography component="span" variant="body2" fontStyle="italic">
({formatDurationRounded(getLastChecked(monitor.checks))} ago)
</Typography>
</Typography> </Typography>
</Box> </Box>
</Stack> </Stack>
-11
View File
@@ -1,17 +1,6 @@
.page-speed h2.MuiTypography-root { .page-speed h2.MuiTypography-root {
line-height: 1.1; line-height: 1.1;
} }
.page-speed:not(:has([class*="fallback__"])) h1.MuiTypography-root {
font-size: var(--env-var-font-size-large-plus);
}
.page-speed h2.MuiTypography-root {
font-size: var(--env-var-font-size-large);
font-weight: 600;
}
.page-speed p:has(> span.MuiTypography-root),
.page-speed p.MuiTypography-root > span.MuiTypography-root {
font-size: var(--env-var-font-size-small-plus);
}
.page-speed .label { .page-speed .label {
padding: 7px; padding: 7px;
height: 22px; height: 22px;
+9 -1
View File
@@ -21,7 +21,14 @@ const shadow =
"0px 4px 24px -4px rgba(255, 255, 255, 0.03), 0px 3px 3px -3px rgba(255, 255, 255, 0.01)"; "0px 4px 24px -4px rgba(255, 255, 255, 0.03), 0px 3px 3px -3px rgba(255, 255, 255, 0.01)";
const darkTheme = createTheme({ const darkTheme = createTheme({
typography: { fontFamily: fontFamilyDefault, fontSize: 13 }, typography: {
fontFamily: fontFamilyDefault,
fontSize: 13,
h1: { fontSize: 22, color: text.primary, fontWeight: 500 },
h2: { fontSize: 14.5, color: text.secondary, fontWeight: 400 },
body1: { fontSize: 13, color: text.tertiary, fontWeight: 400 },
body2: { fontSize: 12, color: text.tertiary, fontWeight: 400 },
},
palette: { palette: {
mode: "dark", mode: "dark",
primary: { main: "#1570ef" }, primary: { main: "#1570ef" },
@@ -70,6 +77,7 @@ const darkTheme = createTheme({
line: "#27272a", line: "#27272a",
fill: "#18181a", fill: "#18181a",
grid: "#454546", grid: "#454546",
autofill: "#2d2d33",
}, },
}, },
spacing: 2, spacing: 2,
+9 -1
View File
@@ -20,7 +20,14 @@ const shadow =
"0px 4px 24px -4px rgba(16, 24, 40, 0.08), 0px 3px 3px -3px rgba(16, 24, 40, 0.03)"; "0px 4px 24px -4px rgba(16, 24, 40, 0.08), 0px 3px 3px -3px rgba(16, 24, 40, 0.03)";
const lightTheme = createTheme({ const lightTheme = createTheme({
typography: { fontFamily: fontFamilyDefault, fontSize: 13 }, typography: {
fontFamily: fontFamilyDefault,
fontSize: 13,
h1: { fontSize: 22, color: text.primary, fontWeight: 500 },
h2: { fontSize: 14.5, color: text.secondary, fontWeight: 400 },
body1: { fontSize: 13, color: text.tertiary, fontWeight: 400 },
body2: { fontSize: 12, color: text.tertiary, fontWeight: 400 },
},
palette: { palette: {
primary: { main: "#1570EF" }, primary: { main: "#1570EF" },
secondary: { main: "#F4F4F4", dark: "#e3e3e3", contrastText: "#475467" }, secondary: { main: "#F4F4F4", dark: "#e3e3e3", contrastText: "#475467" },
@@ -67,6 +74,7 @@ const lightTheme = createTheme({
line: "#d6d9dd", line: "#d6d9dd",
fill: "#e3e3e3", fill: "#e3e3e3",
grid: "#a2a3a3", grid: "#a2a3a3",
autofill: "#e8f0fe",
}, },
}, },
spacing: 2, spacing: 2,
+6 -16
View File
@@ -155,30 +155,20 @@ const Greeting = ({ type = "" }) => {
return ( return (
<Box> <Box>
<Typography <Typography component="h1" variant="h1" mb={theme.spacing(1)}>
component="h1" <Typography component="span" fontSize="inherit">
lineHeight={1} {prepend},{" "}
fontWeight={500} </Typography>
color={theme.palette.text.primary}
mb={theme.spacing(1)}
>
<Typography <Typography
component="span" component="span"
fontSize="inherit" fontSize="inherit"
fontWeight="inherit"
color={theme.palette.text.secondary} color={theme.palette.text.secondary}
> >
{prepend},{" "}
</Typography>
<Typography component="span" fontSize="inherit" fontWeight="inherit">
{firstName} {emoji} {firstName} {emoji}
</Typography> </Typography>
</Typography> </Typography>
<Typography <Typography variant="h2" lineHeight={1} color={theme.palette.text.accent}>
lineHeight={1}
fontSize={14}
fontWeight={400}
color={theme.palette.text.accent}
>
{append} — Here’s an overview of your {type} monitors. {append} — Here’s an overview of your {type} monitors.
</Typography> </Typography>
</Box> </Box>
-2
View File
@@ -9,8 +9,6 @@ html {
} }
:root { :root {
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
font-weight: 400;
font-synthesis: none; font-synthesis: none;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;