Skip to content

Commit 42e2a71

Browse files
authored
fix(switch): allow children to render (#11791) (#11796)
* fix(switch): allow children to render * test(api): update public api snapshot
1 parent 570484d commit 42e2a71

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6142,7 +6142,6 @@ Map {
61426142
"onClick": [Function],
61436143
"onKeyDown": [Function],
61446144
"selected": false,
6145-
"text": "Provide text",
61466145
},
61476146
"propTypes": Object {
61486147
"children": Object {

packages/react/src/components/ContentSwitcher/next/ContentSwitcher.stories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default {
2121
export const Default = () => (
2222
<ContentSwitcher onChange={() => {}}>
2323
<Switch name="one" text="First section" />
24-
<Switch name="two" text="Second section" />
24+
<Switch name="two">Second section</Switch>
2525
<Switch name="three" text="Third section" />
2626
</ContentSwitcher>
2727
);

packages/react/src/components/Switch/Switch.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ Switch.propTypes = {
117117

118118
Switch.defaultProps = {
119119
selected: false,
120-
text: 'Provide text',
121120
onClick: () => {},
122121
onKeyDown: () => {},
123122
};

0 commit comments

Comments
 (0)