Skip to content

docs(text): add component examples to storybook, update switch text prop#9817

Merged
kodiakhq[bot] merged 7 commits into
carbon-design-system:mainfrom
tay1orjones:bidi-docs-updates
Oct 22, 2021
Merged

docs(text): add component examples to storybook, update switch text prop#9817
kodiakhq[bot] merged 7 commits into
carbon-design-system:mainfrom
tay1orjones:bidi-docs-updates

Conversation

@tay1orjones

Copy link
Copy Markdown
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

@tay1orjones tay1orjones requested review from a team as code owners October 7, 2021 14:45
@netlify

netlify Bot commented Oct 7, 2021

Copy link
Copy Markdown

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

netlify Bot commented Oct 7, 2021

Copy link
Copy Markdown

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

netlify Bot commented Oct 7, 2021

Copy link
Copy Markdown

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

@aledavila aledavila left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

* Provide the contents of your Switch
*/
text: PropTypes.string.isRequired,
text: PropTypes.node.isRequired,

Copy link
Copy Markdown
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.

@tay1orjones tay1orjones Oct 21, 2021

Copy link
Copy Markdown
Member Author

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.

Comment thread packages/react/src/components/Switch/Switch.js Outdated
@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