Skip to content

Commit

Permalink
Merge pull request #20 from navedqb/fix--togglebutton-nbsp-render
Browse files Browse the repository at this point in the history
fix: correctly render   for empty labels
  • Loading branch information
navedqb authored Nov 19, 2024
2 parents abb0863 + 94370d1 commit afd55aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/togglebutton/ToggleButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const ToggleButton = React.memo(

const hasLabel = props.onLabel && props.onLabel.length > 0 && props.offLabel && props.offLabel.length > 0;
const hasIcon = props.onIcon && props.offIcon;
const label = hasLabel ? (props.checked ? props.onLabel : props.offLabel) : ' ';
const label = hasLabel ? (props.checked ? props.onLabel : props.offLabel) : '\u00A0';
const icon = props.checked ? props.onIcon : props.offIcon;

const toggle = (e) => {
Expand Down

0 comments on commit afd55aa

Please sign in to comment.