Merge pull request #2025 from bluewave-labs/fix/fe/status-page-tab

Fix status page tab styling
This commit is contained in:
Alexander Holliday authored and GitHub committed 2025-04-03 21:50:58 -07:00
commit 6795afd705
2 files changed
+12 -1

No files matched your search

@@ -1,6 +1,6 @@
// Components // Components
import { TabContext, TabList } from "@mui/lab"; import { TabContext, TabList } from "@mui/lab";
import { Tab } from "@mui/material"; import { Box, Tab, useTheme } from "@mui/material";
import Settings from "./Settings"; import Settings from "./Settings";
import Content from "./Content"; import Content from "./Content";
@@ -22,8 +22,16 @@ const Tabs = ({
setTab, setTab,
TAB_LIST, TAB_LIST,
}) => { }) => {
const theme = useTheme();
return ( return (
<TabContext value={TAB_LIST[tab]}> <TabContext value={TAB_LIST[tab]}>
<Box
sx={{
borderBottom: `1px solid ${theme.palette.primary.lowContrast}`,
"& .MuiTabs-root": { height: "fit-content", minHeight: "0" },
}}
>
<TabList <TabList
onChange={(_, tab) => { onChange={(_, tab) => {
setTab(TAB_LIST.indexOf(tab)); setTab(TAB_LIST.indexOf(tab));
@@ -39,6 +47,7 @@ const Tabs = ({
); );
})} })}
</TabList> </TabList>
</Box>
{tab === 0 ? ( {tab === 0 ? (
<Settings <Settings
tabValue={TAB_LIST[0]} tabValue={TAB_LIST[0]}
@@ -61,6 +70,7 @@ const Tabs = ({
setSelectedMonitors={setSelectedMonitors} setSelectedMonitors={setSelectedMonitors}
/> />
)} )}
</TabContext> </TabContext>
); );
}; };
+1
View File
@@ -370,6 +370,7 @@ const baseTheme = (palette) => ({
color: theme.palette.tertiary.contrastText, color: theme.palette.tertiary.contrastText,
backgroundColor: theme.palette.primary.main, backgroundColor: theme.palette.primary.main,
height: '34px', height: '34px',
minHeight: '34px',
borderRadius: 0, borderRadius: 0,
textTransform: "none", textTransform: "none",
minWidth: "fit-content", minWidth: "fit-content",