diff --git a/client/src/Components/design-elements/Table.tsx b/client/src/Components/design-elements/Table.tsx index 35cd4512f..505f79fea 100644 --- a/client/src/Components/design-elements/Table.tsx +++ b/client/src/Components/design-elements/Table.tsx @@ -29,6 +29,7 @@ import type { TablePaginationOwnProps } from "@mui/material/TablePagination"; import { useTranslation } from "react-i18next"; import { useState, Fragment, useEffect } from "react"; import { useTheme } from "@mui/material/styles"; +import { SPACING, LAYOUT } from "@/Utils/Theme/constants"; import type { SxProps, Theme } from "@mui/material/styles"; import useMediaQuery from "@mui/material/useMediaQuery"; @@ -90,20 +91,20 @@ export function DataTable< // Return stack of cards for small screens if (isSmall && cardsOnSmallScreens) { return ( - + {data.map((row) => { const key = row.id || row._id || Math.random(); keys.push(key); return ( (onRowClick ? onRowClick(row) : null)} - spacing={theme.spacing(4)} + spacing={theme.spacing(LAYOUT.XS)} sx={{ borderStyle: "solid", borderWidth: 1, borderColor: theme.palette.divider, borderRadius: theme.shape.borderRadius, - padding: theme.spacing(4), + padding: theme.spacing(LAYOUT.XS), cursor: onRowClick ? "pointer" : "default", }} key={key} @@ -155,7 +156,7 @@ export function DataTable< { display: "grid", gridTemplateColumns: "1fr 1fr", gridAutoRows: "auto", - rowGap: theme.spacing(1), + rowGap: theme.spacing(SPACING.SM), alignItems: "center", justifyItems: "center", paddingLeft: 0, @@ -556,8 +557,8 @@ const EmptyView = ({ text, positive }: { text?: string; positive?: boolean }) => alignItems={"center"} justifyContent={"center"} sx={{ - py: theme.spacing(12), - px: theme.spacing(4), + py: theme.spacing(LAYOUT.XL), + px: theme.spacing(LAYOUT.XS), borderWidth: 1, borderStyle: "solid", borderColor: theme.palette.divider, @@ -574,7 +575,7 @@ const EmptyView = ({ text, positive }: { text?: string; positive?: boolean }) => display: "flex", alignItems: "center", justifyContent: "center", - mb: theme.spacing(2), + mb: theme.spacing(SPACING.LG), }} > { { title={t("pages.createMonitor.form.general.title")} subtitle={t(`pages.createMonitor.form.general.description.${watchedType}`)} rightContent={ - + {/* URL/Host/Container field - not shown for hardware */} {generalSettingsConfig.showUrl && ( { title={t("pages.createMonitor.form.thresholds.title")} subtitle={t("pages.createMonitor.form.thresholds.description")} rightContent={ - + { title={t("pages.createMonitor.form.incidents.title")} subtitle={t("pages.createMonitor.form.incidents.description")} rightContent={ - + { (field.value ?? []).includes(n.id) ); return ( - + { { title={t("pages.createMonitor.form.advanced.title")} subtitle={t("pages.createMonitor.form.advanced.description")} rightContent={ - + { { )} /> {watchedUseAdvancedMatching && ( - + { title={t("pages.createMonitor.form.geoChecks.title")} subtitle={t("pages.createMonitor.form.geoChecks.description")} rightContent={ - + { { )} /> {watchGeoCheckEnabled && ( - + { (field.value ?? []).includes(loc.id) ); return ( - +