Migrate to Vite+ unified toolchain (#428)

This commit is contained in:
Gregory Schier
2026-03-13 09:27:56 -07:00
committed by GitHub
parent aed7bd12ea
commit 45262edfbd
166 changed files with 1762 additions and 1519 deletions

View File

@@ -62,13 +62,13 @@ export function SegmentedControl<T extends string>({
if (e.key === 'ArrowRight') {
e.preventDefault();
const newIndex = Math.abs((selectedIndex + 1) % options.length);
options[newIndex] && setSelectedValue(options[newIndex].value);
if (options[newIndex]) setSelectedValue(options[newIndex].value);
const child = containerRef.current?.children[newIndex] as HTMLButtonElement;
child.focus();
} else if (e.key === 'ArrowLeft') {
e.preventDefault();
const newIndex = Math.abs((selectedIndex - 1) % options.length);
options[newIndex] && setSelectedValue(options[newIndex].value);
if (options[newIndex]) setSelectedValue(options[newIndex].value);
const child = containerRef.current?.children[newIndex] as HTMLButtonElement;
child.focus();
}