mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: ui
This commit is contained in:
1 parent
7419b3f29e
commit
cffd37c6f1
4 files changed
+75
-24
No files matched your search
@@ -1109,6 +1109,10 @@
|
|||||||
"configuration": {
|
"configuration": {
|
||||||
"title": "Configuration",
|
"title": "Configuration",
|
||||||
|
|
||||||
|
"equalizer": {
|
||||||
|
"title": "Equalizer",
|
||||||
|
"equalize": "Equalize"
|
||||||
|
},
|
||||||
"modules": {
|
"modules": {
|
||||||
"title": "Modules",
|
"title": "Modules",
|
||||||
"stock": "Stock",
|
"stock": "Stock",
|
||||||
|
|||||||
+5
-3
@@ -1,5 +1,5 @@
|
|||||||
import { type FlexProps, Flex } from '@radix-ui/themes';
|
import { type FlexProps, Flex } from "@radix-ui/themes";
|
||||||
import type { ReactNode } from 'react';
|
import type { ReactNode } from "react";
|
||||||
|
|
||||||
type ConfigurationChildWrapperProps = FlexProps & {
|
type ConfigurationChildWrapperProps = FlexProps & {
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
@@ -7,13 +7,15 @@ type ConfigurationChildWrapperProps = FlexProps & {
|
|||||||
|
|
||||||
export function ConfigurationChildWrapper({
|
export function ConfigurationChildWrapper({
|
||||||
children,
|
children,
|
||||||
|
style,
|
||||||
...props
|
...props
|
||||||
}: ConfigurationChildWrapperProps) {
|
}: ConfigurationChildWrapperProps) {
|
||||||
return (
|
return (
|
||||||
<Flex
|
<Flex
|
||||||
gap="2"
|
gap="2"
|
||||||
direction="column"
|
direction="column"
|
||||||
align={{ initial: 'center', sm: 'start' }}
|
align={{ initial: "center", sm: "start" }}
|
||||||
|
style={{ width: "100%", ...style }}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
+43
@@ -0,0 +1,43 @@
|
|||||||
|
import { asset } from "@blitzkit/core";
|
||||||
|
import { Box, Flex, Heading, Switch, Text } from "@radix-ui/themes";
|
||||||
|
import { useLocale } from "../../../../hooks/useLocale";
|
||||||
|
import { ConfigurationChildWrapper } from "./ConfigurationChildWrapper";
|
||||||
|
|
||||||
|
export function Equalizer() {
|
||||||
|
const { strings } = useLocale();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ConfigurationChildWrapper>
|
||||||
|
<Heading size="4">
|
||||||
|
{strings.website.tools.tankopedia.configuration.equalizer.title}
|
||||||
|
</Heading>
|
||||||
|
|
||||||
|
<Box
|
||||||
|
width="100%"
|
||||||
|
style={{
|
||||||
|
cursor: "pointer",
|
||||||
|
borderRadius: "var(--radius-3)",
|
||||||
|
backgroundImage: `url(${asset("icons/game_mode_banners/45.webp")})`,
|
||||||
|
backgroundSize: "cover",
|
||||||
|
backgroundPosition: "center",
|
||||||
|
overflow: "hidden",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Flex
|
||||||
|
width="100%"
|
||||||
|
justify="between"
|
||||||
|
p="4"
|
||||||
|
style={{
|
||||||
|
background:
|
||||||
|
"linear-gradient(90deg, var(--black-a3), var(--gray-1))",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Text>
|
||||||
|
{strings.website.tools.tankopedia.configuration.equalizer.equalize}
|
||||||
|
</Text>
|
||||||
|
<Switch />
|
||||||
|
</Flex>
|
||||||
|
</Box>
|
||||||
|
</ConfigurationChildWrapper>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
import { Flex } from '@radix-ui/themes';
|
import { Flex } from "@radix-ui/themes";
|
||||||
import type { MaybeSkeletonComponentProps } from '../../../types/maybeSkeletonComponentProps';
|
import type { MaybeSkeletonComponentProps } from "../../../types/maybeSkeletonComponentProps";
|
||||||
import { Characteristics } from './components/Characteristics';
|
import { Characteristics } from "./components/Characteristics";
|
||||||
import { CompareOptions } from './components/Characteristics/components/CompareOptions';
|
import { CompareOptions } from "./components/Characteristics/components/CompareOptions";
|
||||||
import { StatSearch } from './components/Characteristics/components/StatSearch';
|
import { StatSearch } from "./components/Characteristics/components/StatSearch";
|
||||||
import { Consumables } from './components/Consumables';
|
import { Consumables } from "./components/Consumables";
|
||||||
import { Equipment } from './components/Equipment';
|
import { Equalizer } from "./components/Equalizer";
|
||||||
import { Miscellaneous } from './components/Miscellaneous';
|
import { Equipment } from "./components/Equipment";
|
||||||
import { Modules } from './components/Modules';
|
import { Miscellaneous } from "./components/Miscellaneous";
|
||||||
import { Provisions } from './components/Provisions';
|
import { Modules } from "./components/Modules";
|
||||||
import { Skills } from './components/Skills';
|
import { Provisions } from "./components/Provisions";
|
||||||
|
import { Skills } from "./components/Skills";
|
||||||
|
|
||||||
export function CharacteristicsSection({
|
export function CharacteristicsSection({
|
||||||
skeleton,
|
skeleton,
|
||||||
@@ -16,34 +17,35 @@ export function CharacteristicsSection({
|
|||||||
return (
|
return (
|
||||||
<Flex direction="column" gap="3">
|
<Flex direction="column" gap="3">
|
||||||
<Flex
|
<Flex
|
||||||
display={{ initial: 'none', sm: 'flex' }}
|
display={{ initial: "none", sm: "flex" }}
|
||||||
direction={{ initial: 'column', md: 'row' }}
|
direction={{ initial: "column", md: "row" }}
|
||||||
align="center"
|
align="center"
|
||||||
justify="center"
|
justify="center"
|
||||||
mb="8"
|
mb="8"
|
||||||
gap={{ initial: '4', md: '8' }}
|
gap={{ initial: "4", md: "8" }}
|
||||||
>
|
>
|
||||||
<CompareOptions />
|
<CompareOptions />
|
||||||
<StatSearch />
|
<StatSearch />
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
<Flex mt="4" px="4" style={{ boxSizing: 'border-box' }} gap="6">
|
<Flex mt="4" px="4" style={{ boxSizing: "border-box" }} gap="6">
|
||||||
<Flex
|
<Flex
|
||||||
flexGrow="1"
|
flexGrow="1"
|
||||||
gap="9"
|
gap="9"
|
||||||
justify="center"
|
justify="center"
|
||||||
align={{ initial: 'center', sm: 'start' }}
|
align={{ initial: "center", sm: "start" }}
|
||||||
direction={{ initial: 'column', sm: 'row' }}
|
direction={{ initial: "column", sm: "row" }}
|
||||||
>
|
>
|
||||||
<Flex
|
<Flex
|
||||||
direction="column"
|
direction="column"
|
||||||
gap="6"
|
gap="6"
|
||||||
maxWidth="19rem"
|
maxWidth="19rem"
|
||||||
align={{ initial: 'center', sm: 'start' }}
|
align={{ initial: "center", sm: "start" }}
|
||||||
>
|
>
|
||||||
<Modules />
|
<Modules />
|
||||||
<Equipment />
|
<Equipment />
|
||||||
<Provisions />
|
<Provisions />
|
||||||
|
<Equalizer />
|
||||||
<Consumables />
|
<Consumables />
|
||||||
<Skills />
|
<Skills />
|
||||||
<Miscellaneous />
|
<Miscellaneous />
|
||||||
@@ -52,11 +54,11 @@ export function CharacteristicsSection({
|
|||||||
<Flex
|
<Flex
|
||||||
direction="column"
|
direction="column"
|
||||||
gap="6"
|
gap="6"
|
||||||
align={{ initial: 'stretch', sm: 'center' }}
|
align={{ initial: "stretch", sm: "center" }}
|
||||||
width={{ initial: '100%', sm: 'auto' }}
|
width={{ initial: "100%", sm: "auto" }}
|
||||||
>
|
>
|
||||||
<Flex
|
<Flex
|
||||||
display={{ initial: 'flex', sm: 'none' }}
|
display={{ initial: "flex", sm: "none" }}
|
||||||
direction="column"
|
direction="column"
|
||||||
align="center"
|
align="center"
|
||||||
justify="center"
|
justify="center"
|
||||||
|
|||||||
Reference in new issue
Block a user