diff --git a/src/renderer/components/hotbar/hotbar-selector.scss b/src/renderer/components/hotbar/hotbar-selector.module.scss similarity index 92% rename from src/renderer/components/hotbar/hotbar-selector.scss rename to src/renderer/components/hotbar/hotbar-selector.module.scss index 5eaeb33692..4e432557e1 100644 --- a/src/renderer/components/hotbar/hotbar-selector.scss +++ b/src/renderer/components/hotbar/hotbar-selector.module.scss @@ -20,6 +20,8 @@ */ .HotbarSelector { + display: flex; + align-items: center; height: 26px; background-color: var(--layoutBackground); position: relative; @@ -33,7 +35,13 @@ top: -20px; } - .SelectorIndex { + .HotbarIndex { + display: flex; + flex-grow: 1; + align-items: center; + } + + .Badge { cursor: pointer; background: var(--secondaryBackground); width: 100%; diff --git a/src/renderer/components/hotbar/hotbar-selector.tsx b/src/renderer/components/hotbar/hotbar-selector.tsx index d0e25bf437..f4faaee80e 100644 --- a/src/renderer/components/hotbar/hotbar-selector.tsx +++ b/src/renderer/components/hotbar/hotbar-selector.tsx @@ -19,7 +19,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -import "./hotbar-selector.scss"; +import styles from "./hotbar-selector.module.scss"; import React, { useRef, useState } from "react"; import { Icon } from "../icon"; import { Badge } from "../badge"; @@ -30,6 +30,7 @@ import { observer } from "mobx-react"; import type { Hotbar } from "../../../common/hotbar-types"; import { withInjectables } from "@ogre-tools/injectable-react"; import commandOverlayInjectable from "../command-palette/command-overlay.injectable"; +import { cssNames } from "../../utils"; export interface HotbarSelectorProps { hotbar: Hotbar; @@ -70,15 +71,19 @@ const NonInjectedHotbarSelector = observer(({ hotbar, hotbarManager, openCommand }; return ( -