This commit is contained in:
tresabhi committed 2026-11-18 22:31:10 -06:00
1 parent 08df0001ed
commit 8cf000cbe6
12 files changed
+265 -42

No files matched your search

@@ -0,0 +1,13 @@
.tabs {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
display: none;
@media screen and (max-width: 80rem) {
display: flex;
}
}
@@ -0,0 +1,24 @@
import { Tankopedia, TankopediaTab } from "../../stores/tankopedia";
import { SegmentedControl } from "../SegmentedControl";
import styles from "./index.module.css";
export function TankopediaTabs() {
const tab = Tankopedia.use((state) => state.tab);
return (
<SegmentedControl
className={styles.tabs}
value={tab}
options={[
{ label: "Sandbox", value: TankopediaTab.Sandbox },
{ label: "Loadout", value: TankopediaTab.Loadout },
]}
onValueChange={(value) => {
Tankopedia.mutate((state) => {
state.tab = value as TankopediaTab;
});
}}
variant="overline"
/>
);
}