mirror of https://github.com/acid-info/lsd.git
feat: add name prop to Checkbox component
This commit is contained in:
parent
907dc4b5d0
commit
0e512be105
|
@ -12,7 +12,7 @@ export type CheckboxProps = Omit<
|
||||||
> &
|
> &
|
||||||
Pick<
|
Pick<
|
||||||
React.InputHTMLAttributes<HTMLInputElement>,
|
React.InputHTMLAttributes<HTMLInputElement>,
|
||||||
'onChange' | 'checked' | 'defaultChecked'
|
'name' | 'onChange' | 'checked' | 'defaultChecked'
|
||||||
> & {
|
> & {
|
||||||
disabled?: boolean
|
disabled?: boolean
|
||||||
indeterminate?: boolean
|
indeterminate?: boolean
|
||||||
|
@ -23,6 +23,7 @@ export type CheckboxProps = Omit<
|
||||||
export const Checkbox: React.FC<CheckboxProps> & {
|
export const Checkbox: React.FC<CheckboxProps> & {
|
||||||
classes: typeof checkboxClasses
|
classes: typeof checkboxClasses
|
||||||
} = ({
|
} = ({
|
||||||
|
name,
|
||||||
size = 'large',
|
size = 'large',
|
||||||
onChange,
|
onChange,
|
||||||
checked,
|
checked,
|
||||||
|
@ -75,6 +76,7 @@ export const Checkbox: React.FC<CheckboxProps> & {
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
ref={ref}
|
ref={ref}
|
||||||
|
name={name}
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
checked={input.value}
|
checked={input.value}
|
||||||
|
|
Loading…
Reference in New Issue