Skip to content

Commit

Permalink
correct empty label rendering in togglebutton (#7433)
Browse files Browse the repository at this point in the history
  • Loading branch information
navedqb authored Nov 19, 2024
1 parent abb0863 commit c7e4673
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 c7e4673

Please sign in to comment.