diff --git a/src/renderer/components/switch/switch.tsx b/src/renderer/components/switch/switch.tsx index 3fe05bdd85..a798a38293 100644 --- a/src/renderer/components/switch/switch.tsx +++ b/src/renderer/components/switch/switch.tsx @@ -21,17 +21,18 @@ import styles from "./switch.module.scss"; -import React from "react"; +import React, { ChangeEvent, HTMLProps } from "react"; import { cssNames } from "../../utils"; -interface Props extends React.HTMLProps { +interface Props extends Omit, "onChange"> { + onChange?: (checked: boolean, event: ChangeEvent) => void; } -export function Switch({ children, disabled, ...props }: Props) { +export function Switch({ children, disabled, onChange, ...props }: Props) { return ( ); }