Skip to content

Commit

Permalink
fix(RadioButton): remove empty span if label text is falsey (#7904)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
emyarod and kodiakhq[bot] authored Feb 25, 2021
1 parent e5cb20c commit 06358da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/components/RadioButton/RadioButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class RadioButton extends React.Component {
/>
<label htmlFor={this.uid} className={`${prefix}--radio-button__label`}>
<span className={`${prefix}--radio-button__appearance`} />
<span className={innerLabelClasses}>{labelText}</span>
{labelText && <span className={innerLabelClasses}>{labelText}</span>}
</label>
</div>
);
Expand Down

0 comments on commit 06358da

Please sign in to comment.