Track HiveGrid Cloud planning reference

This commit is contained in:
david committed 2026-06-26 20:48:01 +02:00
1 parent b3d5ea6764
commit e341c5938a
5784 files changed
+1104929 -3

No files matched your search

@@ -0,0 +1,21 @@
import { t as i18nT } from "i18next";
import { Switch } from "~/ui/components/Switch";
// Subframe migration (strangler shim):
// Keeps the original single-toggle API (`value`/`onChange`/`disabled`) but renders the
// Subframe design-system `Switch`. A single boolean toggle maps to `Switch` (not
// `ToggleGroup`, which is for multi-option segmented controls).
//
// The legacy field was fully controlled (`value: boolean`, required `onChange`), so the shim
// stays controlled too — `checked={value}` + `onCheckedChange={onChange}`. No internal state
// is needed because the caller always owns the value.
interface Props {
value: boolean;
onChange(checked: boolean): void;
disabled?: boolean;
}
export default function Toggle({ value, onChange, disabled }: Props) {
return (
<Switch checked={value} disabled={disabled} onCheckedChange={onChange} aria-label={i18nT("components.toggle.useSetting")} />
);
}