This commit is contained in:
tresabhi committed 2026-10-31 17:54:36 -05:00
1 parent 23fc2510da
commit c4edafa94b
5 files changed
+30 -19

No files matched your search

@@ -16,9 +16,17 @@
cursor: pointer; cursor: pointer;
&[data-even-padding] {
padding: var(--space-3);
}
&[data-size="minor"] { &[data-size="minor"] {
font-size: 0.7em; font-size: 0.7em;
padding: var(--space-2) var(--space-3); padding: var(--space-2) var(--space-3);
&[data-even-padding] {
padding: var(--space-2);
}
} }
&[data-size="major"] { &[data-size="major"] {
@@ -62,8 +70,6 @@
width: 1.25em; width: 1.25em;
height: 1.25em; height: 1.25em;
margin: -0.25em 0;
object-fit: contain; object-fit: contain;
} }
@@ -9,6 +9,7 @@ export interface ButtonProps extends ComponentProps<"button"> {
variant?: "solid" | "surface" | "soft" | "inverted" | "ghost" | "outline"; variant?: "solid" | "surface" | "soft" | "inverted" | "ghost" | "outline";
size?: "regular" | "minor" | "major"; size?: "regular" | "minor" | "major";
highContrast?: boolean; highContrast?: boolean;
evenPadding?: boolean;
listChild?: "horizontal" | "vertical"; listChild?: "horizontal" | "vertical";
parentListChild?: "horizontal" | "vertical"; parentListChild?: "horizontal" | "vertical";
@@ -36,6 +37,7 @@ export function Button({
style, style,
radius = "max", radius = "max",
size = "regular", size = "regular",
evenPadding,
listChild, listChild,
parentListChild, parentListChild,
@@ -53,6 +55,7 @@ export function Button({
data-list-child={listChild} data-list-child={listChild}
data-parent-list-child={parentListChild} data-parent-list-child={parentListChild}
data-high-contrast={highContrast} data-high-contrast={highContrast}
data-even-padding={evenPadding}
{...props} {...props}
/> />
); );
@@ -17,7 +17,7 @@
margin: var(--space-4); margin: var(--space-4);
box-shadow: var(--shadow-subtle); box-shadow: var(--shadow-subtle);
border-radius: var(--space-3); border-radius: var(--space-4);
outline: var(--outline-interactive) !important; outline: var(--outline-interactive) !important;
scrollbar-width: none; scrollbar-width: none;
@@ -2,6 +2,4 @@ import { DropdownMenu as _ } from "radix-ui";
import { composeRadixComponents } from "../../ui/compose"; import { composeRadixComponents } from "../../ui/compose";
import styles from "./index.module.css"; import styles from "./index.module.css";
export const DropdownMenu = composeRadixComponents(_, styles, { export const DropdownMenu = composeRadixComponents(_, styles);
Content: { align: "start" },
});
@@ -21,7 +21,6 @@ import { Button } from "../Button";
import { ClassIcon } from "../ClassIcon"; import { ClassIcon } from "../ClassIcon";
import { DropdownMenu } from "../DropdownMenu"; import { DropdownMenu } from "../DropdownMenu";
import { GunTypeIcon } from "../GunTypeIcon"; import { GunTypeIcon } from "../GunTypeIcon";
import { IconButton } from "../IconButton";
import { MissingShellIcon } from "../MissingShellIcon"; import { MissingShellIcon } from "../MissingShellIcon";
import { ResearchedIcon } from "../ResearchedIcon"; import { ResearchedIcon } from "../ResearchedIcon";
import { ScienceIcon } from "../ScienceIcon"; import { ScienceIcon } from "../ScienceIcon";
@@ -174,7 +173,8 @@ export function TankSearchFilters() {
function ResetButton() { function ResetButton() {
return ( return (
<IconButton <Button
evenPadding
color="red" color="red"
variant="solid" variant="solid"
onClick={() => { onClick={() => {
@@ -182,7 +182,7 @@ function ResetButton() {
}} }}
> >
<TrashIcon /> <TrashIcon />
</IconButton> </Button>
); );
} }
@@ -599,7 +599,7 @@ function IndividualShellFilter({
return ( return (
<DropdownMenu.Root modal={false}> <DropdownMenu.Root modal={false}>
<DropdownMenu.Trigger asChild> <DropdownMenu.Trigger asChild>
<IconButton listChild="horizontal" variant="soft" color="gray"> <Button listChild="horizontal" variant="soft" color="gray" evenPadding>
{shells[index] === null && ( {shells[index] === null && (
<MissingShellIcon width="1em" height="1em" /> <MissingShellIcon width="1em" height="1em" />
)} )}
@@ -612,7 +612,7 @@ function IndividualShellFilter({
)} )}
/> />
)} )}
</IconButton> </Button>
</DropdownMenu.Trigger> </DropdownMenu.Trigger>
<DropdownMenu.Content> <DropdownMenu.Content>
@@ -709,7 +709,8 @@ function OwnershipFilterInternal() {
return ( return (
<div className={styles.grouped}> <div className={styles.grouped}>
<IconButton <Button
evenPadding
listChild="horizontal" listChild="horizontal"
disabled={!wargaming} disabled={!wargaming}
variant={showOwned ? "solid" : "soft"} variant={showOwned ? "solid" : "soft"}
@@ -723,9 +724,10 @@ function OwnershipFilterInternal() {
}} }}
> >
<LockOpen2Icon /> <LockOpen2Icon />
</IconButton> </Button>
<IconButton <Button
evenPadding
listChild="horizontal" listChild="horizontal"
disabled={!wargaming} disabled={!wargaming}
variant={showUnowned ? "solid" : "soft"} variant={showUnowned ? "solid" : "soft"}
@@ -739,7 +741,7 @@ function OwnershipFilterInternal() {
}} }}
> >
<LockClosedIcon /> <LockClosedIcon />
</IconButton> </Button>
</div> </div>
); );
} }
@@ -750,7 +752,8 @@ function TestFilter() {
return ( return (
<div className={styles.grouped}> <div className={styles.grouped}>
<IconButton <Button
evenPadding
variant={showNonTesting ? "solid" : "soft"} variant={showNonTesting ? "solid" : "soft"}
color={showNonTesting ? undefined : "gray"} color={showNonTesting ? undefined : "gray"}
highContrast={showNonTesting} highContrast={showNonTesting}
@@ -763,9 +766,10 @@ function TestFilter() {
}} }}
> >
<ScienceOffIcon /> <ScienceOffIcon />
</IconButton> </Button>
<IconButton <Button
evenPadding
variant={showTesting ? "solid" : "soft"} variant={showTesting ? "solid" : "soft"}
color={showTesting ? undefined : "gray"} color={showTesting ? undefined : "gray"}
highContrast={showTesting} highContrast={showTesting}
@@ -778,7 +782,7 @@ function TestFilter() {
}} }}
> >
<ScienceIcon /> <ScienceIcon />
</IconButton> </Button>
</div> </div>
); );
} }