mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add flat TableHead param
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
a5c62da002
commit
d0fbee324f
@ -36,4 +36,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.flat {
|
||||||
|
background-color: transparent;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,6 +15,7 @@ export interface TableHeadProps extends React.DOMAttributes<HTMLDivElement> {
|
|||||||
showTopLine?: boolean; // show border line at the top
|
showTopLine?: boolean; // show border line at the top
|
||||||
sticky?: boolean; // keep header on top when scrolling
|
sticky?: boolean; // keep header on top when scrolling
|
||||||
nowrap?: boolean; // white-space: nowrap, align inner <TableCell> in one line
|
nowrap?: boolean; // white-space: nowrap, align inner <TableCell> in one line
|
||||||
|
flat?: boolean; // no header background
|
||||||
}
|
}
|
||||||
|
|
||||||
export class TableHead extends React.Component<TableHeadProps> {
|
export class TableHead extends React.Component<TableHeadProps> {
|
||||||
@ -23,10 +24,11 @@ export class TableHead extends React.Component<TableHeadProps> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
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, {
|
const classNames = cssNames("TableHead", className, {
|
||||||
sticky, nowrap,
|
sticky, nowrap,
|
||||||
topLine: showTopLine,
|
topLine: showTopLine,
|
||||||
|
flat,
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user