docs(text): add component examples to storybook, update switch text prop#9817
Conversation
|
✔️ Deploy Preview for carbon-react-next ready! 🔨 Explore the source changes: 3583c0b 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/617318488814a20008ddb95b 😎 Browse the preview: https://deploy-preview-9817--carbon-react-next.netlify.app |
|
✔️ Deploy Preview for carbon-elements ready! 🔨 Explore the source changes: 3583c0b 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/617318488814a20008ddb956 😎 Browse the preview: https://deploy-preview-9817--carbon-elements.netlify.app |
|
✔️ Deploy Preview for carbon-components-react ready! 🔨 Explore the source changes: 3583c0b 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/617318488814a20008ddb951 😎 Browse the preview: https://deploy-preview-9817--carbon-components-react.netlify.app |
| * Provide the contents of your Switch | ||
| */ | ||
| text: PropTypes.string.isRequired, | ||
| text: PropTypes.node.isRequired, |
There was a problem hiding this comment.
For consistency, would it help if this component to accept a children prop for the generalized PropTypes.node use-case? Having text not be PropTypes.string can be confusing sometimes.
There was a problem hiding this comment.
@joshblack Yeah I dig that idea. I'll deprecate Actually it seems like there could be a benefit to keeping text around - it has styles associated with it to enable truncation.text, too.
…-design-system#9817) [](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [karma-spec-reporter](https://togithub.com/tmcgee123/karma-spec-reporter) | [`0.0.34` -> `0.0.35`](https://renovatebot.com/diffs/npm/karma-spec-reporter/0.0.34/0.0.35) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>tmcgee123/karma-spec-reporter</summary> ### [`v0.0.35`](https://togithub.com/tmcgee123/karma-spec-reporter/compare/v0.0.34...v0.0.35) [Compare Source](https://togithub.com/tmcgee123/karma-spec-reporter/compare/v0.0.34...v0.0.35) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "every weekend" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Never, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/carbon-design-system/carbon-for-ibm-dotcom). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC41MS4wIiwidXBkYXRlZEluVmVyIjoiMzQuNTEuMCJ9-->
Minor changes stemming from #9493 (comment)
Changelog
New
Textusage examples to the storybookChanged
textprop to acceptnode, soTextcan be used for bidi textTesting / Reviewing
Component Examplesstory with a few component examples stemming from the conversation