From e6310cb4a4b0765e8ac69688aa4553bd9caa8b43 Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Fri, 23 Apr 2021 10:21:18 +0300 Subject: [PATCH] add tooltip to hotbar index Signed-off-by: Jari Kolehmainen --- src/renderer/components/hotbar/hotbar-menu.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/renderer/components/hotbar/hotbar-menu.tsx b/src/renderer/components/hotbar/hotbar-menu.tsx index 197671b034..8f13c6a7db 100644 --- a/src/renderer/components/hotbar/hotbar-menu.tsx +++ b/src/renderer/components/hotbar/hotbar-menu.tsx @@ -12,6 +12,7 @@ import { Icon } from "../icon"; import { Badge } from "../badge"; import { CommandOverlay } from "../command-palette"; import { HotbarSwitchCommand } from "./hotbar-switch-command"; +import { Tooltip, TooltipPosition } from "../tooltip"; interface Props { className?: IClassName; @@ -43,6 +44,7 @@ export class HotbarMenu extends React.Component { render() { const { className } = this.props; + const hotbar = HotbarStore.getInstance(); const hotbarIndex = HotbarStore.getInstance().activeHotbarIndex + 1; return ( @@ -63,7 +65,13 @@ export class HotbarMenu extends React.Component {
this.previous()} />
- this.openSelector()} /> + this.openSelector()} /> + + {hotbar.name} +
this.next()} />