mirror of
https://github.com/Steffo99/bluelib.git
synced 2024-12-22 19:44:21 +00:00
🔧 Move Checkbox
value
to the first argument
This commit is contained in:
parent
990b5c7477
commit
6355ddee36
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue