mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Styling disabled hotbar items
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
3fcd44b676
commit
c679a88ff1
@ -20,6 +20,18 @@
|
|||||||
transition: all 0s 0.8s;
|
transition: all 0s 0.8s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.disabled {
|
||||||
|
opacity: 0.4;
|
||||||
|
cursor: default;
|
||||||
|
filter: grayscale(0.7);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
&:not(.active) {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&.active, &.interactive:hover {
|
&.active, &.interactive:hover {
|
||||||
img {
|
img {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
|||||||
@ -113,7 +113,10 @@ export function HotbarIcon(props: Props) {
|
|||||||
toggleMenu();
|
toggleMenu();
|
||||||
}}
|
}}
|
||||||
close={() => toggleMenu()}>
|
close={() => toggleMenu()}>
|
||||||
<MenuItem key="remove-from-hotbar" onClick={() => remove(uid) }>
|
<MenuItem key="remove-from-hotbar" onClick={(evt) => {
|
||||||
|
evt.stopPropagation();
|
||||||
|
remove(uid);
|
||||||
|
}}>
|
||||||
<Icon material="clear" small interactive={true} title="Remove from hotbar"/> Remove from Hotbar
|
<Icon material="clear" small interactive={true} title="Remove from hotbar"/> Remove from Hotbar
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
{ menuItems.map((menuItem) => {
|
{ menuItems.map((menuItem) => {
|
||||||
|
|||||||
@ -96,7 +96,7 @@ export class HotbarMenu extends React.Component<Props> {
|
|||||||
<HotbarEntityIcon
|
<HotbarEntityIcon
|
||||||
key={index}
|
key={index}
|
||||||
entity={entity}
|
entity={entity}
|
||||||
onClick={() => entity?.onRun(catalogEntityRunContext)}
|
onClick={() => entity.onRun(catalogEntityRunContext)}
|
||||||
className={cssNames({ isDragging: snapshot.isDragging })}
|
className={cssNames({ isDragging: snapshot.isDragging })}
|
||||||
remove={this.removeItem}
|
remove={this.removeItem}
|
||||||
/>
|
/>
|
||||||
@ -106,6 +106,7 @@ export class HotbarMenu extends React.Component<Props> {
|
|||||||
title={item.entity.name}
|
title={item.entity.name}
|
||||||
source={item.entity.source}
|
source={item.entity.source}
|
||||||
remove={this.removeItem}
|
remove={this.removeItem}
|
||||||
|
disabled
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user