migrate compare and tankopedia loadout to new data-driven components, splitting the old monolithic loadout and compare UI into smaller pieces and adding shared Table, Dialog and Scroller primitives

This commit is contained in:
tresabhi committed 2026-11-14 01:17:38 -06:00
1 parent 287aba853f
commit c311a6ab8b
111 files changed
+4009 -3917

No files matched your search

@@ -1,7 +1,12 @@
import { CheckIcon } from "@radix-ui/react-icons";
import { Checkbox as _Checkbox } from "radix-ui";
import { useId, type ReactNode } from "react";
import { Text } from "../Text";
import { composeRadixComponents } from "../../ui/compose";
import styles from "./index.module.css";
const _ = composeRadixComponents(_Checkbox, styles);
export interface CheckboxProps {
checked: boolean;
onCheckedChange(checked: boolean): void;
@@ -17,13 +22,15 @@ export function Checkbox({
return (
<div className={styles.checkbox}>
<input
className={styles.control}
type="checkbox"
<_.Root
id={id}
checked={checked}
onChange={(event) => onCheckedChange(event.target.checked)}
/>
onCheckedChange={(value) => onCheckedChange(value === true)}
>
<_.Indicator>
<CheckIcon />
</_.Indicator>
</_.Root>
{children && (
<label htmlFor={id}>