generated from Luis/nextjs-python-web-template
added custom table component - again
This commit is contained in:
23
pkgs/ui/src/components/table/style.tsx
Normal file
23
pkgs/ui/src/components/table/style.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import { styled } from '@mui/material/styles';
|
||||
import TableCell, { tableCellClasses } from '@mui/material/TableCell';
|
||||
import TableRow from '@mui/material/TableRow';
|
||||
|
||||
export const StyledTableCell = styled(TableCell)(({ theme }) => ({
|
||||
[`&.${tableCellClasses.head}`]: {
|
||||
backgroundColor: theme.palette.common.black,
|
||||
color: theme.palette.common.white,
|
||||
},
|
||||
[`&.${tableCellClasses.body}`]: {
|
||||
fontSize: 14,
|
||||
},
|
||||
}));
|
||||
|
||||
export const StyledTableRow = styled(TableRow)(({ theme }) => ({
|
||||
'&:nth-of-type(odd)': {
|
||||
backgroundColor: theme.palette.action.hover,
|
||||
},
|
||||
// hide last border
|
||||
'&:last-child td, &:last-child th': {
|
||||
border: 0,
|
||||
},
|
||||
}));
|
||||
Reference in New Issue
Block a user