From d531fad62f6359ee2333c4bdf9caba869d770f40 Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Sun, 25 Apr 2021 06:44:51 +0300 Subject: [PATCH] Add/remove empty cells Signed-off-by: Alex Andreev --- .../components/hotbar/hotbar-icon.tsx | 2 +- .../components/hotbar/hotbar-menu.scss | 37 +++++++++++++++++++ .../components/hotbar/hotbar-menu.tsx | 7 +++- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/hotbar/hotbar-icon.tsx b/src/renderer/components/hotbar/hotbar-icon.tsx index 87cb06bebf..485be6f5ee 100644 --- a/src/renderer/components/hotbar/hotbar-icon.tsx +++ b/src/renderer/components/hotbar/hotbar-icon.tsx @@ -103,7 +103,7 @@ export class HotbarIcon extends React.Component { {entity.metadata.name} {this.iconString} { onClick={() => entity.onRun(catalogEntityRunContext)} /> )} + {!entity && ( +
HotbarStore.getInstance().removeEmptyCell(index)}> + +
+ )} ); }); @@ -90,7 +95,7 @@ export class HotbarMenu extends React.Component { renderAddCellButton() { return ( - );