CORPORATION: Update tooltip of storage space (#1237)

The tooltip of the storage space only shows sizes of materials/products. This is confusing for newbies. They use "Unit" (number of material/product units) when buying materials, but that tooltip only shows sizes without any description.
This commit is contained in:
catloversg
2024-05-09 06:29:03 +07:00
committed by GitHub
parent bc71b8e18f
commit 6a1691fe54
5 changed files with 30 additions and 16 deletions
+8 -6
View File
@@ -8,16 +8,18 @@ interface StatsTableProps {
rows: ReactNode[][];
title?: string;
wide?: boolean;
paddingLeft?: string;
}
const useStyles = makeStyles({
firstCell: { textAlign: "left" },
nonFirstCell: { textAlign: "right", paddingLeft: "0.5em" },
});
const useStyles = (paddingLeft: string) =>
makeStyles({
firstCell: { textAlign: "left" },
nonFirstCell: { textAlign: "right", paddingLeft: paddingLeft },
})();
export function StatsTable({ rows, title, wide }: StatsTableProps): ReactElement {
export function StatsTable({ rows, title, wide, paddingLeft }: StatsTableProps): ReactElement {
const T = wide ? MuiTable : Table;
const classes = useStyles();
const classes = useStyles(paddingLeft ?? "0.5em");
return (
<>
{title && <Typography>{title}</Typography>}