diff --git a/apps/admin-x-design-system/src/global/form/Toggle.tsx b/apps/admin-x-design-system/src/global/form/Toggle.tsx index 5a056cd21a..4a3df9987f 100644 --- a/apps/admin-x-design-system/src/global/form/Toggle.tsx +++ b/apps/admin-x-design-system/src/global/form/Toggle.tsx @@ -9,6 +9,7 @@ export type ToggleDirections = 'ltr' | 'rtl'; export interface ToggleProps { checked?: boolean; disabled?: boolean; + name?: string; error?: boolean; size?: ToggleSizes; label?: React.ReactNode; @@ -33,6 +34,7 @@ const Toggle: React.FC = ({ error, checked, disabled, + name, onChange }) => { const id = useId(); @@ -95,6 +97,7 @@ const Toggle: React.FC = ({ )} disabled={disabled} id={id} + name={name} role="switch" type="checkbox" onChange={onChange} /> diff --git a/apps/admin-x-settings/src/components/settings/advanced/labs/FeatureToggle.tsx b/apps/admin-x-settings/src/components/settings/advanced/labs/FeatureToggle.tsx index 6835d89916..6cdf7944b1 100644 --- a/apps/admin-x-settings/src/components/settings/advanced/labs/FeatureToggle.tsx +++ b/apps/admin-x-settings/src/components/settings/advanced/labs/FeatureToggle.tsx @@ -13,7 +13,7 @@ const FeatureToggle: React.FC<{ flag: string; label?: string; }> = ({label, flag const client = useQueryClient(); const handleError = useHandleError(); - return { + return { const newValue = !labs[flag]; try { await editSettings([{