Merge pull request #2025 from bluewave-labs/fix/fe/status-page-tab
Fix status page tab styling
This commit is contained in:
2 files changed
+25
-14
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,23 +22,32 @@ const Tabs = ({
|
|||||||
setTab,
|
setTab,
|
||||||
TAB_LIST,
|
TAB_LIST,
|
||||||
}) => {
|
}) => {
|
||||||
|
|
||||||
|
const theme = useTheme();
|
||||||
return (
|
return (
|
||||||
<TabContext value={TAB_LIST[tab]}>
|
<TabContext value={TAB_LIST[tab]}>
|
||||||
<TabList
|
<Box
|
||||||
onChange={(_, tab) => {
|
sx={{
|
||||||
setTab(TAB_LIST.indexOf(tab));
|
borderBottom: `1px solid ${theme.palette.primary.lowContrast}`,
|
||||||
|
"& .MuiTabs-root": { height: "fit-content", minHeight: "0" },
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{TAB_LIST.map((tab, idx) => {
|
<TabList
|
||||||
return (
|
onChange={(_, tab) => {
|
||||||
<Tab
|
setTab(TAB_LIST.indexOf(tab));
|
||||||
key={tab}
|
}}
|
||||||
label={TAB_LIST[idx]}
|
>
|
||||||
value={TAB_LIST[idx]}
|
{TAB_LIST.map((tab, idx) => {
|
||||||
/>
|
return (
|
||||||
);
|
<Tab
|
||||||
})}
|
key={tab}
|
||||||
</TabList>
|
label={TAB_LIST[idx]}
|
||||||
|
value={TAB_LIST[idx]}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</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>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
Reference in new issue
Block a user