Add flat TableHead param

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev committed 2023-01-19 12:12:09 +03:00
1 parent a5c62da002
commit d0fbee324f
2 files changed
+8 -1

No files matched your search

@@ -36,4 +36,9 @@
}
}
}
&.flat {
background-color: transparent;
font-weight: 600;
}
}
+3 -1
View File
@@ -15,6 +15,7 @@ export interface TableHeadProps extends React.DOMAttributes<HTMLDivElement> {
showTopLine?: boolean; // show border line at the top
sticky?: boolean; // keep header on top when scrolling
nowrap?: boolean; // white-space: nowrap, align inner <TableCell> in one line
flat?: boolean; // no header background
}
export class TableHead extends React.Component<TableHeadProps> {
@@ -23,10 +24,11 @@ export class TableHead extends React.Component<TableHeadProps> {
};
render() {
const { className, sticky, nowrap, showTopLine, children, ...headProps } = this.props;
const { className, sticky, nowrap, showTopLine, flat, children, ...headProps } = this.props;
const classNames = cssNames("TableHead", className, {
sticky, nowrap,
topLine: showTopLine,
flat,
});
return (