-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(text): add component examples to storybook, update switch text prop #9817
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -107,7 +107,7 @@ Switch.propTypes = { | |||
/** | |||
* Provide the contents of your Switch | |||
*/ | |||
text: PropTypes.string.isRequired, | |||
text: PropTypes.node.isRequired, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [karma-spec-reporter](https://github.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) | [![age](https://badges.renovateapi.com/packages/npm/karma-spec-reporter/0.0.35/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/karma-spec-reporter/0.0.35/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/karma-spec-reporter/0.0.35/compatibility-slim/0.0.34)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/karma-spec-reporter/0.0.35/confidence-slim/0.0.34)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>tmcgee123/karma-spec-reporter</summary> ### [`v0.0.35`](https://github.com/tmcgee123/karma-spec-reporter/compare/v0.0.34...v0.0.35) [Compare Source](https://github.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
Text
usage examples to the storybookChanged
text
prop to acceptnode
, soText
can be used for bidi textTesting / Reviewing
Component Examples
story with a few component examples stemming from the conversation