diff --git a/src/harmony/Switch/Switch.tsx b/src/harmony/Switch/Switch.tsx index c1340374..a867b1c1 100644 --- a/src/harmony/Switch/Switch.tsx +++ b/src/harmony/Switch/Switch.tsx @@ -9,7 +9,7 @@ import { Counter } from '../Counter/Counter'; import classes from './Switch.module.css'; interface SwitchProps extends Omit, 'onChange'> { - onChange?: (event: React.SyntheticEvent) => void; + onChange?: (event: React.SyntheticEvent, active: string) => void; name?: string; value?: string; animated?: boolean; @@ -139,7 +139,7 @@ export const Switch: React.FC> = ({ (event: React.SyntheticEvent, nextActive: string) => { setActive(nextActive); - onChange?.(event); + onChange?.(event, nextActive); }, [onChange], );