Skip to content

Commit

Permalink
Merge branch 'main' into feat/add-collector-to-www
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Dec 15, 2021
2 parents 0c508d6 + 8b01d69 commit 8f5503f
Show file tree
Hide file tree
Showing 6 changed files with 1,026 additions and 50 deletions.
4 changes: 2 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* @carbon-design-system/developers-system

# Core icons and pictograms
/packages/icons/svg/ @laurenmrice @conradennis @dudley-ibm @carbon-design-system/developers-system
/packages/pictograms/svg/ @laurenmrice @conradennis @dudley-ibm @carbon-design-system/developers-system
/packages/icons/src/svg/ @laurenmrice @conradennis @dudley-ibm @carbon-design-system/developers-system
/packages/pictograms/src/svg/ @laurenmrice @conradennis @dudley-ibm @carbon-design-system/developers-system

# Angular icons
/packages/icons-angular/ @cal-smith @carbon-design-system/developers-system
Expand Down
17 changes: 0 additions & 17 deletions packages/react/src/components/Checkbox/Checkbox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -91,23 +91,6 @@ event.
<Checkbox onChange={()=>{}} labelText={`Checkbox label`} id="checkbox-label-2" />
```

### Checkbox onClick

You can use the `onClick` prop to pass in a custom function for event handling.
This event can be used to control click event bubbling without having to
implement your own wrapping element/component. It receives the dom event as its
only argument.

`onClick` is placed on the wrapping `div` containing both the `input` and
`label`. As such, this will be called twice for every click - once for the
input, a second time for the label. Due to this, `onClick` should not be used to
catch state updates when using Checkbox as a controlled component.

```jsx
<Checkbox onClick={()=>{}} labelText={`Checkbox label`} id="checkbox-label-1" />
<Checkbox onClick={()=>{}} labelText={`Checkbox label`} id="checkbox-label-2" />
```

## Feedback

Help us improve this component by providing feedback, asking questions on Slack,
Expand Down
Loading

0 comments on commit 8f5503f

Please sign in to comment.