CE-740 footer weight 600 vs body 500

This commit is contained in:
2023-11-16 19:00:23 -06:00
parent 87edebb79f
commit b1d685b5b1
3 changed files with 14 additions and 8 deletions

View File

@ -331,14 +331,13 @@ function DataTable({
{ {
cell.column.type === "default" && ( cell.column.type === "default" && (
cell.value && "number" === typeof cell.value ? ( cell.value && "number" === typeof cell.value ? (
<DefaultCell>{cell.value.toLocaleString()}</DefaultCell> <DefaultCell isFooter={isFooter}>{cell.value.toLocaleString()}</DefaultCell>
) : (<DefaultCell>{cell.render("Cell")}</DefaultCell>) ) : (<DefaultCell isFooter={isFooter}>{cell.render("Cell")}</DefaultCell>)
) )
} }
{ {
cell.column.type === "htmlAndTooltip" && ( cell.column.type === "htmlAndTooltip" && (
<DefaultCell> <DefaultCell isFooter={isFooter}>
<NoMaxWidthTooltip title={parse(row.values["tooltip"])}> <NoMaxWidthTooltip title={parse(row.values["tooltip"])}>
<Box> <Box>
{parse(cell.value)} {parse(cell.value)}
@ -349,7 +348,7 @@ function DataTable({
} }
{ {
cell.column.type === "html" && ( cell.column.type === "html" && (
<DefaultCell>{parse(cell.value)}</DefaultCell> <DefaultCell isFooter={isFooter}>{parse(cell.value)}</DefaultCell>
) )
} }
{ {

View File

@ -118,7 +118,7 @@ function TableCard({noRowsFoundHTML, data, rowsPerPage, hidePaginationDropdown,
<TableRow sx={{verticalAlign: "top"}} key={`row-${i}`}> <TableRow sx={{verticalAlign: "top"}} key={`row-${i}`}>
{Array(8).fill(0).map((_, j) => {Array(8).fill(0).map((_, j) =>
<DataTableBodyCell key={`cell-${i}-${j}`} align="center"> <DataTableBodyCell key={`cell-${i}-${j}`} align="center">
<DefaultCell><Skeleton /></DefaultCell> <DefaultCell isFooter={false}><Skeleton /></DefaultCell>
</DataTableBodyCell> </DataTableBodyCell>
)} )}
</TableRow> </TableRow>

View File

@ -17,11 +17,18 @@ import {ReactNode} from "react";
import colors from "qqq/assets/theme/base/colors"; import colors from "qqq/assets/theme/base/colors";
import MDTypography from "qqq/components/legacy/MDTypography"; import MDTypography from "qqq/components/legacy/MDTypography";
function DefaultCell({children}: { children: ReactNode }): JSX.Element interface Props
{
isFooter: boolean
children: ReactNode;
}
function DefaultCell({isFooter, children}: Props): JSX.Element
{ {
return ( return (
<MDTypography variant="button" color={colors.dark.main} sx={{ <MDTypography variant="button" color={colors.dark.main} sx={{
fontWeight: 600, fontWeight: isFooter ? 600 : 500,
"@media (min-width: 1440px)": { "@media (min-width: 1440px)": {
fontSize: "1rem" fontSize: "1rem"
}, },