mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-29 04:44:23 +01:00
navbars
This commit is contained in:
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"
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user