Skip to content

Commit

Permalink
fix(types): add id prop to checkbox (uber#5224)
Browse files Browse the repository at this point in the history
* fix(types): add id prop to checkbox

* fix(types): use the correct line ending

Co-authored-by: Chase Starr <[email protected]>
  • Loading branch information
rareyesdev and chasestarr authored Nov 17, 2022
1 parent 914a0da commit d8a9819
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/checkbox/checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ class StatelessCheckbox extends React.Component<CheckboxProps, CheckboxState> {
error,
disabled,
value,
id,
name,
type,
checked,
Expand Down Expand Up @@ -182,6 +183,7 @@ class StatelessCheckbox extends React.Component<CheckboxProps, CheckboxState> {
)}
<Input
value={value}
id={id}
name={name}
checked={checked}
required={required}
Expand Down
2 changes: 2 additions & 0 deletions src/checkbox/types.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ export type PropsT = {
autoFocus?: boolean,
/** Passed to the input element type attribute */
type?: string,
/** Passed to the input element id attribute */
id?: string,
/** Passed to the input element name attribute */
name?: string,
/** Passed to the input element value attribute */
Expand Down
2 changes: 2 additions & 0 deletions src/checkbox/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ export type CheckboxProps = {
autoFocus?: boolean;
/** Passed to the input element type attribute */
type?: string;
/** Passed to the input element id attribute */
id?: string;
/** Passed to the input element name attribute */
name?: string;
/** Passed to the input element value attribute */
Expand Down

0 comments on commit d8a9819

Please sign in to comment.