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

change topbar X to back button

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2021-07-29 11:14:08 +03:00
parent e43961ec4f
commit 78cfa64801
4 changed files with 17 additions and 19 deletions

View File

@ -30,10 +30,9 @@ export function CatalogTopbar() {
<TopBar label="Catalog">
<div>
<Icon
style={{ cursor: "default" }}
material="close"
material="chevron_left"
onClick={() => navigate(welcomeURL())}
tooltip="Close Catalog"
tooltip="Back to Welcome"
/>
</div>
</TopBar>

View File

@ -43,19 +43,17 @@ export const ClusterTopbar = observer((props: Props) => {
return (
<TopBar label={getCluster()?.name}>
<div>
<Icon
style={{ cursor: "default" }}
material="close"
onClick={() => {
navigate(`${catalogURL()}/${previousActiveTab.get()}`);
}}
tooltip={{
preferredPositions: TooltipPosition.BOTTOM_RIGHT,
children: "Back to Catalog"
}}
/>
</div>
<Icon
interactive
material="chevron_left"
onClick={() => {
navigate(`${catalogURL()}/${previousActiveTab.get()}`);
}}
tooltip={{
preferredPositions: TooltipPosition.BOTTOM_RIGHT,
children: "Back to Catalog"
}}
/>
</TopBar>
);
});

View File

@ -39,8 +39,10 @@
.controls {
align-self: flex-end;
padding-right: 1.5rem;
align-items: center;
display: flex;
height: 100%;
> * {
-webkit-app-region: no-drag;
}
}

View File

@ -55,10 +55,9 @@ export const TopBar = observer(({ label, children, ...rest }: Props) => {
return (
<div className={styles.topBar} {...rest}>
<div className={styles.title} data-testid="topbarLabel">{label}</div>
<div className={styles.title} data-testid="topbarLabel">{children} {label}</div>
<div className={styles.controls}>
{renderRegisteredItems()}
{children}
</div>
</div>
);