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

fix(RadioButton): remove empty span if label text is falsey #7904

Merged
merged 2 commits into from
Feb 25, 2021

Conversation

emyarod
Copy link
Member

@emyarod emyarod commented Feb 25, 2021

This PR removes an empty span element when the radio button labelText is falsey. There was a case where a falsey labelText value together with hideLabel="true" would render an empty span with .bx--visually-hidden styles

image

Testing/Reviewing

Clear the label in the radio button storybook and confirm that the empty span is no longer rendered

@netlify
Copy link

netlify bot commented Feb 25, 2021

Deploy preview for carbon-elements ready!

Built with commit 032bca2

https://deploy-preview-7904--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Feb 25, 2021

Deploy preview for carbon-components-react ready!

Built without sensitive environment variables with commit 032bca2

https://deploy-preview-7904--carbon-components-react.netlify.app

Copy link
Contributor

@andreancardona andreancardona left a comment

Choose a reason for hiding this comment

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

Looks good!

@kodiakhq kodiakhq bot merged commit 06358da into carbon-design-system:master Feb 25, 2021
@emyarod emyarod deleted the radio-button-empty-span branch February 26, 2021 16:56
@dakahn dakahn mentioned this pull request Mar 4, 2021
@emyarod emyarod mentioned this pull request Mar 8, 2021
60 tasks
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.

3 participants