feat(proj): init

This commit is contained in:
vl.arkhangelskii
2026-09-21 03:53:15 +03:00
commit 3e34f391b3
258 changed files with 20968 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
type Option<T extends string> = { value: T; label: string };
type Props<T extends string> = {
value: T;
options: Option<T>[];
onChange: (value: T) => void;
ariaLabel?: string;
};
export function AppSegmented<T extends string>({
value,
options,
onChange,
ariaLabel,
}: Props<T>) {
return (
<div className="app-segmented" role="tablist" aria-label={ariaLabel}>
{options.map((option) => (
<button
key={option.value}
type="button"
role="tab"
aria-selected={option.value === value}
className={`app-segmented__item${option.value === value ? " is-on" : ""}`}
onClick={() => onChange(option.value)}
>
{option.label}
</button>
))}
</div>
);
}