Skip to content
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

Merged
merged 7 commits into from
Oct 22, 2021

Conversation

tay1orjones
Copy link
Member

Minor changes stemming from #9493 (comment)

Changelog

New

  • Text: Add more Text usage examples to the storybook

Changed

  • Switch: update text prop to accept node, so Text can be used for bidi text

Testing / Reviewing

  • carbon-components-react storybook should show a new Component Examples story with a few component examples stemming from the conversation
  • The ContentSwitcher/Switch should not throw a prop-types warning

@netlify
Copy link

netlify bot commented Oct 7, 2021

✔️ 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

@netlify
Copy link

netlify bot commented Oct 7, 2021

✔️ 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

@netlify
Copy link

netlify bot commented Oct 7, 2021

✔️ Deploy Preview for carbon-components-react ready!
Built without sensitive environment variables

🔨 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

Copy link
Contributor

@aledavila aledavila left a 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,
Copy link
Contributor

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.

Copy link
Member Author

@tay1orjones tay1orjones Oct 21, 2021

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 text, too. Actually it seems like there could be a benefit to keeping text around - it has styles associated with it to enable truncation.

@kodiakhq kodiakhq bot merged commit 877e478 into carbon-design-system:main Oct 22, 2021
kennylam pushed a commit to kennylam/carbon that referenced this pull request Jul 30, 2024
…-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://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) | [![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://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-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants