Skip to content

Commit 689d430

Browse files
committed
🏷️ Add type for callback function params for React
1 parent 31f334e commit 689d430

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/components/Checkbox/Checkbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import check from '../../icons/check.svg?raw'
77
import './checkbox.scss'
88

99
type ReactCheckboxProps = {
10-
onClick?: () => any
10+
onClick?: (key: any) => any
1111
} & CheckboxProps
1212

1313
const Checkbox = ({

src/components/Radio/Radio.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import ConditionalWrapper from '../ConditionalWrapper/ConditionalWrapper.tsx'
66
import './radio.scss'
77

88
type ReactRadioProps = {
9-
onChange?: () => any
9+
onChange?: (key: any) => any
1010
} & RadioProps
1111

1212
const Radio = ({

src/components/Switch/Switch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { SwitchProps } from './switch'
33
import './switch.scss'
44

55
type ReactSwitchProps = {
6-
onClick?: () => any
6+
onClick?: (key: any) => any
77
} & SwitchProps
88

99
const Switch = ({

0 commit comments

Comments
 (0)