mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-11 11:46:10 +01:00
antagonist controls
This commit is contained in:
18 files changed
+316
-259
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import { literals } from "@blitzkit/i18n/src/literals";
|
||||
import { EyeClosedIcon, EyeOpenIcon } from "@radix-ui/react-icons";
|
||||
import { useCallback, type ReactNode } from "react";
|
||||
import { useAbsoluteDisplay } from "../../hooks/useAbsoluteDisplay";
|
||||
import { useStrings } from "../../hooks/useStrings";
|
||||
import { Tankopedia } from "../../stores/tankopedia";
|
||||
import { TankopediaPersistent } from "../../stores/tankopediaPersistent";
|
||||
@@ -61,7 +62,9 @@ export interface ThicknessesProps {
|
||||
|
||||
export function Thicknesses({ thicknessRange }: ThicknessesProps) {
|
||||
const strings = useStrings();
|
||||
const display = Tankopedia.use((state) => state.loaders.display.loaded);
|
||||
const isStaticArmorDisplay = useAbsoluteDisplay(
|
||||
TankopediaDisplay.StaticArmor,
|
||||
);
|
||||
const showControls = Tankopedia.use((state) => state.showControls);
|
||||
const showPrimaryArmor = TankopediaPersistent.use(
|
||||
(state) => state.showPrimaryArmor,
|
||||
@@ -87,7 +90,7 @@ export function Thicknesses({ thicknessRange }: ThicknessesProps) {
|
||||
return (
|
||||
<div
|
||||
className={styles.thicknesses}
|
||||
data-visible={showControls && display === TankopediaDisplay.StaticArmor}
|
||||
data-visible={showControls && isStaticArmorDisplay}
|
||||
>
|
||||
<LayerToggle
|
||||
visible={showPrimaryArmor}
|
||||
|
||||
Reference in new issue
Block a user