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

Show close btn on hover

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-03-11 18:34:01 +03:00
parent 4ac89429de
commit 98af8f9bc1
2 changed files with 19 additions and 8 deletions

View File

@ -26,7 +26,7 @@
background-color: hsl(245deg 8% 28%);
background-image: none;
.tabIcon {
.close {
opacity: 1;
}
}
@ -39,12 +39,22 @@
background-color: #343439;
background-image: none;
.tabIcon {
.close {
opacity: 1;
background: linear-gradient(90deg, transparent 0%, #343439 25%);
}
}
}
.close {
position: absolute;
right: 0px;
width: 5ch;
opacity: 0;
text-align: center;
background: linear-gradient(90deg, transparent 0%, rgba(67,66,77,1) 25%);
}
.tabIcon {
opacity: 0;
}

View File

@ -83,12 +83,13 @@ class NonInjectedDockTab extends React.Component<DockTabProps & Dependencies> {
<span className={styles.title} title={title}>{title}</span>
{moreActions}
{!pinned && (
<Icon
className={styles.tabIcon}
small material="close"
tooltip={`Close ${isMac ? "⌘+W" : "Ctrl+W"}`}
onClick={prevDefault(this.close)}
/>
<div className={styles.close}>
<Icon
small material="close"
tooltip={`Close ${isMac ? "⌘+W" : "Ctrl+W"}`}
onClick={prevDefault(this.close)}
/>
</div>
)}
</div>
);