forked from dmm-com/pagoda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTable.tsx
37 lines (32 loc) · 979 Bytes
/
Table.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import {
TableCell,
TableRow,
TableCellProps,
TableRowProps,
} from "@mui/material";
import { styled } from "@mui/material/styles";
import { SxProps, Theme } from "@mui/system";
import React from "react";
type StyledTableRowProps = TableRowProps & {
sx?: SxProps<Theme>;
};
type StyledTableCellProps = TableCellProps & {
sx?: SxProps<Theme>;
};
export const HeaderTableRow: React.ComponentType<StyledTableRowProps> = styled(
TableRow,
)<StyledTableRowProps>({
backgroundColor: "#455A64",
}) as React.ComponentType<StyledTableRowProps>;
export const HeaderTableCell: React.ComponentType<StyledTableCellProps> =
styled(TableCell)<StyledTableCellProps>({
color: "#FFFFFF",
boxSizing: "border-box",
}) as React.ComponentType<StyledTableCellProps>;
export const StyledTableRow: React.ComponentType<StyledTableRowProps> = styled(
TableRow,
)<StyledTableRowProps>({
"& td": {
padding: "8px",
},
}) as React.ComponentType<StyledTableRowProps>;