mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: reset button
This commit is contained in:
1 parent
5ed5f45240
commit
ee5461a297
2 files changed
+9
-11
No files matched your search
@@ -12,6 +12,7 @@ import locales from "@blitzkit/i18n/locales.json";
|
|||||||
import {
|
import {
|
||||||
LockClosedIcon,
|
LockClosedIcon,
|
||||||
LockOpen2Icon,
|
LockOpen2Icon,
|
||||||
|
ResetIcon,
|
||||||
TrashIcon,
|
TrashIcon,
|
||||||
} from "@radix-ui/react-icons";
|
} from "@radix-ui/react-icons";
|
||||||
import {
|
import {
|
||||||
@@ -128,7 +129,7 @@ const TIERS = times(10, (i) => 10 - i);
|
|||||||
|
|
||||||
export function FilterControl() {
|
export function FilterControl() {
|
||||||
return (
|
return (
|
||||||
<Flex align="center" gap="2" wrap="wrap" justify="center">
|
<Flex align="center" gap="2" wrap="wrap">
|
||||||
<TiersFilter />
|
<TiersFilter />
|
||||||
<ClassFilter />
|
<ClassFilter />
|
||||||
<TypeFilter />
|
<TypeFilter />
|
||||||
@@ -144,25 +145,22 @@ export function FilterControl() {
|
|||||||
<AbilitiesFilter />
|
<AbilitiesFilter />
|
||||||
<PowersFilter />
|
<PowersFilter />
|
||||||
|
|
||||||
<ClearButton />
|
<ResetButton />
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ClearButton() {
|
function ResetButton() {
|
||||||
const { strings } = useLocale();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button
|
<IconButton
|
||||||
color="red"
|
color="red"
|
||||||
variant="surface"
|
variant="solid"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
TankFilters.set(TankFilters.initial);
|
TankFilters.set(TankFilters.initial);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<TrashIcon />
|
<ResetIcon />
|
||||||
{strings.website.common.tank_search.clear}
|
</IconButton>
|
||||||
</Button>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export function Page({
|
|||||||
}: LocaleAcceptorProps & MaybeSkeletonComponentProps) {
|
}: LocaleAcceptorProps & MaybeSkeletonComponentProps) {
|
||||||
return (
|
return (
|
||||||
<LocaleProvider locale={locale}>
|
<LocaleProvider locale={locale}>
|
||||||
<PageWrapper color="purple" maxWidth="90rem">
|
<PageWrapper color="purple" maxWidth="80rem">
|
||||||
<TankSearch skeleton={skeleton} />
|
<TankSearch skeleton={skeleton} />
|
||||||
</PageWrapper>
|
</PageWrapper>
|
||||||
</LocaleProvider>
|
</LocaleProvider>
|
||||||
|
|||||||
Reference in new issue
Block a user