IMPROVEMENT: partial migration @mui/styles to tss-react (#1338)

This commit is contained in:
Caldwell
2024-06-03 18:27:13 +02:00
committed by GitHub
parent e622b9b904
commit cb92643c7e
44 changed files with 545 additions and 604 deletions
+3 -3
View File
@@ -2,7 +2,7 @@ import React, { ReactNode, ReactElement } from "react";
import { Table, TableCell } from "./Table";
import { TableBody, TableRow, Table as MuiTable, Typography } from "@mui/material";
import { makeStyles } from "@mui/styles";
import { makeStyles } from "tss-react/mui";
interface StatsTableProps {
rows: ReactNode[][];
@@ -12,14 +12,14 @@ interface StatsTableProps {
}
const useStyles = (paddingLeft: string) =>
makeStyles({
makeStyles()({
firstCell: { textAlign: "left" },
nonFirstCell: { textAlign: "right", paddingLeft: paddingLeft },
})();
export function StatsTable({ rows, title, wide, paddingLeft }: StatsTableProps): ReactElement {
const T = wide ? MuiTable : Table;
const classes = useStyles(paddingLeft ?? "0.5em");
const { classes } = useStyles(paddingLeft ?? "0.5em");
return (
<>
{title && <Typography>{title}</Typography>}