1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

EntityIcon in Settings sidebar

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-06-22 15:41:28 +03:00
parent 8af14ee8c5
commit 1f3b733d83
2 changed files with 18 additions and 4 deletions

View File

@ -33,6 +33,7 @@ import { EntitySettingRegistry } from "../../../extensions/registries";
import type { EntitySettingsRouteParams } from "../../../common/routes";
import { groupBy } from "lodash";
import { SettingLayout } from "../layout/setting-layout";
import { HotbarIcon } from "../hotbar/hotbar-icon";
interface Props extends RouteComponentProps<EntitySettingsRouteParams> {
}
@ -83,7 +84,15 @@ export class EntitySettings extends React.Component<Props> {
return (
<>
<h2>{this.entity.metadata.name}</h2>
<div className="flex items-center pb-8">
<HotbarIcon
uid={this.entity.metadata.uid}
title={this.entity.metadata.name}
source={this.entity.metadata.source}
src={this.entity.spec.icon?.src}
/>
<h2>{this.entity.metadata.name}</h2>
</div>
<Tabs className="flex column" scrollable={false} onChange={this.onTabChange} value={this.activeTab}>
{ groups.map((group, groupIndex) => (
<React.Fragment key={`group-${groupIndex}`}>

View File

@ -53,12 +53,12 @@
padding: 60px 0 60px 20px;
h2 {
margin-bottom: 10px;
font-size: 18px;
padding: 6px 10px;
font-size: 15px;
overflow-wrap: anywhere;
color: var(--textColorAccent);
font-weight: 600;
padding-right: 20px;
word-break: break-word;
}
hr {
@ -81,6 +81,7 @@
font-weight: 800;
line-height: 16px;
text-transform: uppercase;
color: var(--textColorPrimary);
&:first-child {
padding-top: 0;
@ -119,6 +120,10 @@
}
}
}
.HotbarIcon {
margin: 0 11px;
}
}
}