fixed theme not using theme.ts
This commit is contained in:
parent
ffa060cee8
commit
6727d9f132
4 changed files with 9 additions and 15 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { DeveloperBoard as ProvisionIcon, LibraryAdd as CreateGroupIcon } from "@mui/icons-material";
|
||||
import { Box, Chip, Grid2, IconButton, Skeleton, Tab, Tabs, Theme, Tooltip, Typography } from "@mui/material";
|
||||
import { Box, Chip, Grid2, IconButton, Skeleton, Tab, Tabs, Theme, Tooltip, Typography, useTheme } from "@mui/material";
|
||||
import { blue, green, orange } from "@mui/material/colors";
|
||||
import { makeStyles } from "@mui/styles";
|
||||
import ResponsiveTable, { Column } from "common/ResponsiveTable";
|
||||
|
|
@ -74,6 +74,7 @@ const useStyles = makeStyles((theme: Theme) => {
|
|||
});
|
||||
|
||||
export default function Devices() {
|
||||
const theme = useTheme();
|
||||
const isMobile = useMobile();
|
||||
const classes = useStyles();
|
||||
const navigate = useNavigate();
|
||||
|
|
@ -263,7 +264,7 @@ export default function Devices() {
|
|||
const status = device.status ?? pond.DeviceStatus.create()
|
||||
const deviceStateHelper = getDeviceStateHelper(status.state);
|
||||
return (
|
||||
<Box className={classes.cellContainer}>
|
||||
<Box className={classes.cellContainer} style={{ width: theme.spacing(0.5)}}>
|
||||
<Tooltip title={deviceStateHelper.description}>{deviceStateHelper.icon}</Tooltip>
|
||||
</Box>
|
||||
)
|
||||
|
|
@ -279,10 +280,11 @@ export default function Devices() {
|
|||
title: "Device",
|
||||
render: (device: Device) => {
|
||||
return (
|
||||
<Box className={classes.cellContainer} >
|
||||
<Box className={classes.cellContainer}>
|
||||
<Chip
|
||||
variant="outlined"
|
||||
label={device.settings?.name ? device.settings.name : "Device " + device.settings?.deviceId}
|
||||
sx={{ maxWidth: 120}}
|
||||
/>
|
||||
</Box>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue