mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Replacing icon for Remove from Hotbar action (#4086)
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
1 parent
b0ddb5eb77
commit
46653386b9
5 files changed
+5
-10
No files matched your search
@@ -98,8 +98,8 @@ export class CatalogEntityDrawerMenu<T extends CatalogEntity> extends React.Comp
|
||||
<HotbarToggleMenuItem
|
||||
key="hotbar-toggle"
|
||||
entity={entity}
|
||||
addContent={<Icon material="push_pin" small tooltip={"Add to Hotbar"}/>}
|
||||
removeContent={<Icon svg="unpin" small tooltip={"Remove from Hotbar"}/>}
|
||||
addContent={<Icon material="push_pin" small tooltip="Add to Hotbar"/>}
|
||||
removeContent={<Icon svg="push_off" small tooltip="Remove from Hotbar"/>}
|
||||
/>
|
||||
);
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ export class Catalog extends React.Component<Props> {
|
||||
small
|
||||
className={styles.pinIcon}
|
||||
material={!isItemInHotbar && "push_pin"}
|
||||
svg={isItemInHotbar && "unpin"}
|
||||
svg={isItemInHotbar && "push_off"}
|
||||
tooltip={isItemInHotbar ? "Remove from Hotbar" : "Add to Hotbar"}
|
||||
onClick={prevDefault(() => isItemInHotbar ? this.removeFromHotbar(item) : this.addToHotbar(item))}
|
||||
/>
|
||||
|
||||
@@ -26,7 +26,7 @@ import { MenuItem } from "../menu";
|
||||
import type { CatalogEntity } from "../../api/catalog-entity";
|
||||
|
||||
export function HotbarToggleMenuItem(props: { entity: CatalogEntity, addContent: ReactNode, removeContent: ReactNode }) {
|
||||
const store = HotbarStore.getInstance(false);
|
||||
const store = HotbarStore.getInstance();
|
||||
const add = () => store.addToHotbar(props.entity);
|
||||
const remove = () => store.removeFromHotbar(props.entity.getId());
|
||||
const [itemInHotbar, setItemInHotbar] = useState(store.isAddedToActive(props.entity));
|
||||
|
||||
Reference in new issue
Block a user