Skip to content

Commit

Permalink
fix(switch): allow children to render (#11791) (#11796)
Browse files Browse the repository at this point in the history
* fix(switch): allow children to render

* test(api): update public api snapshot
  • Loading branch information
tay1orjones authored Jul 14, 2022
1 parent 570484d commit 42e2a71
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6142,7 +6142,6 @@ Map {
"onClick": [Function],
"onKeyDown": [Function],
"selected": false,
"text": "Provide text",
},
"propTypes": Object {
"children": Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
export const Default = () => (
<ContentSwitcher onChange={() => {}}>
<Switch name="one" text="First section" />
<Switch name="two" text="Second section" />
<Switch name="two">Second section</Switch>
<Switch name="three" text="Third section" />
</ContentSwitcher>
);
Expand Down
1 change: 0 additions & 1 deletion packages/react/src/components/Switch/Switch.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ Switch.propTypes = {

Switch.defaultProps = {
selected: false,
text: 'Provide text',
onClick: () => {},
onKeyDown: () => {},
};
Expand Down

0 comments on commit 42e2a71

Please sign in to comment.