1
Fork 0
mirror of https://github.com/Steffo99/bluelib.git synced 2024-12-22 11:34:21 +00:00

🔧 Move Checkbox value to the first argument

This commit is contained in:
Steffo 2021-08-20 05:07:29 +02:00
parent 990b5c7477
commit 6355ddee36
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -8,7 +8,7 @@ import mergeClassNames from "classnames"
interface CheckboxProps {
disabled?: boolean,
onChange?: (checked: boolean, value: string) => boolean,
onChange?: (value: string, checked: boolean) => boolean,
name: string,
value: string,
@ -27,7 +27,7 @@ export function Checkbox({onChange, ...props}: CheckboxProps): JSX.Element {
const value = event.target.value
if(onChange) {
return onChange(checked, value)
return onChange(value, checked)
}
return false