add prettier formatter to all file
This commit is contained in:
@@ -1,39 +1,46 @@
|
||||
import { Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from '@mui/material'
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableContainer,
|
||||
TableHead,
|
||||
TableRow,
|
||||
} from "@mui/material";
|
||||
|
||||
function CustomTable({ tableHead, zeroRadius, centerTable, children }) {
|
||||
return (
|
||||
<TableContainer
|
||||
className='!shadow-none table-shadow-none !overflow-auto !border !border-solid !border-[#DBDBDB]'
|
||||
sx={{
|
||||
'&.MuiTableContainer-root': {
|
||||
borderRadius: zeroRadius && '0 !important'
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Table className='!rounded-0 !shadow-none !overflow-hidden'>
|
||||
<TableHead>
|
||||
<TableRow
|
||||
className='!bg-[#EFEFEF]'
|
||||
>
|
||||
{tableHead.map((item, idx) => (
|
||||
<TableCell
|
||||
key={idx}
|
||||
className={`
|
||||
return (
|
||||
<TableContainer
|
||||
className="!shadow-none table-shadow-none !overflow-auto !border !border-solid !border-[#DBDBDB]"
|
||||
sx={{
|
||||
"&.MuiTableContainer-root": {
|
||||
borderRadius: zeroRadius && "0 !important",
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Table className="!rounded-0 !shadow-none !overflow-hidden">
|
||||
<TableHead>
|
||||
<TableRow className="!bg-[#EFEFEF]">
|
||||
{tableHead.map((item, idx) => (
|
||||
<TableCell
|
||||
key={idx}
|
||||
className={`
|
||||
!text-[#616161] !text-[14px] !font-normal !py-[10px] !px-[18px]
|
||||
${centerTable.includes(idx) ? '!text-center' : '!text-start'}
|
||||
${
|
||||
centerTable.includes(idx)
|
||||
? "!text-center"
|
||||
: "!text-start"
|
||||
}
|
||||
`}
|
||||
>
|
||||
{item}
|
||||
</TableCell>
|
||||
))}
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
<TableBody>
|
||||
{children}
|
||||
</TableBody>
|
||||
</Table>
|
||||
</TableContainer>
|
||||
)
|
||||
>
|
||||
{item}
|
||||
</TableCell>
|
||||
))}
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
<TableBody>{children}</TableBody>
|
||||
</Table>
|
||||
</TableContainer>
|
||||
);
|
||||
}
|
||||
|
||||
export default CustomTable
|
||||
export default CustomTable;
|
||||
|
||||
Reference in New Issue
Block a user