Doomsday cleanup part 2
This commit is contained in:
1 parent
a3f1e73755
commit
ef746c2afa
26 files changed
+265
-1016
No files matched your search
Whitespace-only changes.
@@ -1,19 +0,0 @@
|
||||
import { BarChart } from "@mui/x-charts/BarChart";
|
||||
|
||||
const ChartsOverviewDemo = () => {
|
||||
return (
|
||||
<BarChart
|
||||
series={[
|
||||
{ data: [35, 44, 24, 34] },
|
||||
{ data: [51, 6, 49, 30] },
|
||||
{ data: [15, 25, 30, 50] },
|
||||
{ data: [60, 50, 15, 25] },
|
||||
]}
|
||||
height={290}
|
||||
xAxis={[{ data: ["Q1", "Q2", "Q3", "Q4"], scaleType: "band" }]}
|
||||
margin={{ top: 10, bottom: 30, left: 40, right: 10 }}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default ChartsOverviewDemo;
|
||||
@@ -1,9 +0,0 @@
|
||||
#dashboard-setting-menu-item {
|
||||
width: 135px;
|
||||
padding: 6px;
|
||||
margin: 5px 12px;
|
||||
}
|
||||
|
||||
#menu-appbar {
|
||||
padding: var(--env-var-spacing-1);
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
import "./index.css";
|
||||
import { useState } from "react";
|
||||
import Box from "@mui/material/Box";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import Menu from "@mui/material/Menu";
|
||||
import Tooltip from "@mui/material/Tooltip";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
import SettingsIcon from "@mui/icons-material/Settings";
|
||||
import { useTheme } from "@mui/material/styles";
|
||||
|
||||
const settings = [
|
||||
"Open Site",
|
||||
"Detailed View",
|
||||
"Incidents",
|
||||
"Configure",
|
||||
"Remove",
|
||||
];
|
||||
|
||||
/**
|
||||
* DashboardSettings component
|
||||
*
|
||||
* A component that provides a settings menu accessible from an icon.
|
||||
*
|
||||
* @component
|
||||
* @example
|
||||
* return (
|
||||
* <DashboardSettings />
|
||||
* )
|
||||
*/
|
||||
function DashboardSettings() {
|
||||
const theme = useTheme();
|
||||
const [anchorElUser, setAnchorElUser] = useState(null);
|
||||
|
||||
/**
|
||||
* Handles opening the user menu.
|
||||
*
|
||||
* @param {React.MouseEvent<HTMLElement>} event - The event triggered by clicking the user menu button.
|
||||
*/
|
||||
const handleOpenUserMenu = (event) => {
|
||||
setAnchorElUser(event.currentTarget);
|
||||
};
|
||||
|
||||
/**
|
||||
* Handles closing the user menu.
|
||||
*/
|
||||
const handleCloseUserMenu = () => {
|
||||
setAnchorElUser(null);
|
||||
};
|
||||
|
||||
return (
|
||||
<Box sx={{ flexGrow: 0 }}>
|
||||
<Tooltip title="Open settings">
|
||||
<IconButton onClick={handleOpenUserMenu} sx={{ p: 0 }}>
|
||||
<SvgIcon component={SettingsIcon} />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
<Menu
|
||||
sx={{ mt: theme.spacing(5.5) }}
|
||||
id="menu-appbar"
|
||||
anchorEl={anchorElUser}
|
||||
anchorOrigin={{
|
||||
vertical: "top",
|
||||
horizontal: "right",
|
||||
}}
|
||||
keepMounted
|
||||
transformOrigin={{
|
||||
vertical: "top",
|
||||
horizontal: "right",
|
||||
}}
|
||||
open={Boolean(anchorElUser)}
|
||||
onClose={handleCloseUserMenu}
|
||||
>
|
||||
{settings.map((setting) => (
|
||||
<MenuItem
|
||||
id="dashboard-setting-menu-item"
|
||||
key={setting}
|
||||
onClick={handleCloseUserMenu}
|
||||
>
|
||||
<Typography
|
||||
style={{ fontSize: "var(--env-var-font-size-medium)" }}
|
||||
textAlign="center"
|
||||
>
|
||||
{setting}
|
||||
</Typography>
|
||||
</MenuItem>
|
||||
))}
|
||||
</Menu>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
export default DashboardSettings;
|
||||
Reference in new issue
Block a user