mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Use event.target instead of props.checked
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
b8e56dfba5
commit
a3d5454df2
@ -21,7 +21,7 @@ export function Switch({ children, disabled, onChange, ...props }: SwitchProps)
|
|||||||
type="checkbox"
|
type="checkbox"
|
||||||
role="switch"
|
role="switch"
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onChange={(event) => onChange?.(!props.checked, event)}
|
onChange={(event) => onChange?.(event.target.checked, event)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user