added a way to do cell styling in the responsive tables
This commit is contained in:
parent
d19d37410e
commit
2fc25431bd
2 changed files with 7 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { Box, Grid2 as Grid, Skeleton, Theme, Tooltip } from "@mui/material";
|
||||
import { Box, Grid2 as Grid, Skeleton, Theme, Tooltip, Typography } from "@mui/material";
|
||||
import { makeStyles } from "@mui/styles";
|
||||
import { NextMeasurementChip } from "common/NextMeasurementChip";
|
||||
import ResponsiveTable, { Column } from "common/ResponsiveTable";
|
||||
|
|
@ -465,16 +465,20 @@ export default function DeviceComponent() {
|
|||
return [
|
||||
{
|
||||
title: "Timestamp",
|
||||
cellStyle: {width: "50%"},
|
||||
render: row => {
|
||||
return (
|
||||
<Tooltip title={moment(row.timestamp).calendar()}>
|
||||
<span>{moment(row.timestamp).fromNow()}</span>
|
||||
<Box>
|
||||
<Typography>{moment(row.timestamp).fromNow()}</Typography>
|
||||
</Box>
|
||||
</Tooltip>
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "Measurement",
|
||||
cellStyle: {width: "50%"},
|
||||
render: row => {
|
||||
return (
|
||||
<UnitMeasurementSummary
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue