mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-26 06:44:58 +00:00
code: tsx,table,nextjs (1 files)
This commit is contained in:
@@ -100,20 +100,24 @@ TableRow.displayName = 'TableRow'
|
||||
interface TableHeadProps {
|
||||
children: ReactNode
|
||||
className?: string
|
||||
onClick?: () => void
|
||||
}
|
||||
|
||||
const TableHead = forwardRef<HTMLTableCellElement, TableHeadProps>(
|
||||
({ children, ...props }, ref) => {
|
||||
({ children, onClick, ...props }, ref) => {
|
||||
return (
|
||||
<MuiTableCell
|
||||
ref={ref}
|
||||
component="th"
|
||||
onClick={onClick}
|
||||
sx={{
|
||||
fontWeight: 600,
|
||||
fontSize: '0.75rem',
|
||||
color: 'text.secondary',
|
||||
textTransform: 'uppercase',
|
||||
letterSpacing: '0.05em',
|
||||
cursor: onClick ? 'pointer' : 'default',
|
||||
'&:hover': onClick ? { bgcolor: 'action.hover' } : {},
|
||||
}}
|
||||
{...props}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user