mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix KubeObjectDetails light theme table view (#6981)
* Add flat TableHead param Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Use flat headers across details panel tables Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
b8d1ef708e
commit
943756bad9
@ -78,7 +78,7 @@ const NonInjectedEventDetails = observer(({
|
||||
|
||||
<DrawerTitle>Involved object</DrawerTitle>
|
||||
<Table>
|
||||
<TableHead>
|
||||
<TableHead flat>
|
||||
<TableCell>Name</TableCell>
|
||||
<TableCell>Namespace</TableCell>
|
||||
<TableCell>Kind</TableCell>
|
||||
|
||||
@ -37,7 +37,7 @@ class NonInjectedIngressDetails extends React.Component<IngressDetailsProps & De
|
||||
)}
|
||||
{rule.http && (
|
||||
<Table className="paths">
|
||||
<TableHead>
|
||||
<TableHead flat>
|
||||
<TableCell className="path">Path</TableCell>
|
||||
<TableCell className="link">Link</TableCell>
|
||||
<TableCell className="backends">Backends</TableCell>
|
||||
|
||||
@ -46,7 +46,7 @@ class NonInjectedServiceDetailsEndpoint extends React.Component<ServiceDetailsEn
|
||||
scrollable={false}
|
||||
className="box grow"
|
||||
>
|
||||
<TableHead>
|
||||
<TableHead flat>
|
||||
<TableCell className="name" >Name</TableCell>
|
||||
<TableCell className="endpoints">Endpoints</TableCell>
|
||||
</TableHead>
|
||||
|
||||
@ -38,7 +38,7 @@ export function NodeDetailsResources({ type, node: { status = {}}}: NodeDetailsR
|
||||
selectable
|
||||
scrollable={false}
|
||||
>
|
||||
<TableHead sticky={false}>
|
||||
<TableHead sticky={false} flat>
|
||||
<TableCell className="cpu">CPU</TableCell>
|
||||
<TableCell className="memory">Memory</TableCell>
|
||||
<TableCell className="ephemeral-storage">Ephemeral Storage</TableCell>
|
||||
|
||||
@ -78,7 +78,7 @@ class NonInjectedDeploymentReplicaSets extends React.Component<DeploymentReplica
|
||||
sortSyncWithUrl={false}
|
||||
className="box grow"
|
||||
>
|
||||
<TableHead>
|
||||
<TableHead flat>
|
||||
<TableCell className="name" sortBy={sortBy.name}>Name</TableCell>
|
||||
<TableCell className="warning"/>
|
||||
<TableCell className="namespace" sortBy={sortBy.namespace}>Namespace</TableCell>
|
||||
|
||||
@ -190,7 +190,7 @@ class NonInjectedPodDetailsList extends React.Component<PodDetailsListProps & De
|
||||
)}
|
||||
className="box grow"
|
||||
>
|
||||
<TableHead>
|
||||
<TableHead flat>
|
||||
<TableCell className="name" sortBy={sortBy.name}>Name</TableCell>
|
||||
<TableCell className="warning"/>
|
||||
<TableCell className="node" sortBy={sortBy.node}>Node</TableCell>
|
||||
|
||||
@ -86,9 +86,5 @@
|
||||
.drawer-content {
|
||||
overflow: auto;
|
||||
padding: var(--spacing);
|
||||
|
||||
.Table .TableHead {
|
||||
border-bottom: 1px solid var(--borderFaintColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
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 (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user