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

Use material icon for unpin from hotbar action

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-10-19 12:57:06 +03:00
parent c5d51a72e1
commit 8022c54ff9
2 changed files with 3 additions and 4 deletions

View File

@ -99,7 +99,7 @@ export class CatalogEntityDrawerMenu<T extends CatalogEntity> extends React.Comp
key="hotbar-toggle"
entity={entity}
addContent={<Icon material="push_pin" small tooltip={"Add to Hotbar"}/>}
removeContent={<Icon svg="unpin" small tooltip={"Remove from Hotbar"}/>}
removeContent={<Icon material="keep_off" small tooltip={"Remove from Hotbar"}/>}
/>
);

View File

@ -74,7 +74,7 @@ export class Catalog extends React.Component<Props> {
this.catalogEntityStore = props.catalogEntityStore;
}
static defaultProps = {
catalogEntityStore: new CatalogEntityStore(),
catalogEntityStore: new CatalogEntityStore(),
};
get routeActiveTab(): string {
@ -219,8 +219,7 @@ export class Catalog extends React.Component<Props> {
<Icon
small
className={styles.pinIcon}
material={!isItemInHotbar && "push_pin"}
svg={isItemInHotbar && "unpin"}
material={isItemInHotbar ? "keep_off" : "push_pin"}
tooltip={isItemInHotbar ? "Remove from Hotbar" : "Add to Hotbar"}
onClick={prevDefault(() => isItemInHotbar ? this.removeFromHotbar(item) : this.addToHotbar(item))}
/>