Web: Components: toggle-button: fixed size icon

This commit is contained in:
Artem Tarasov 2020-11-05 16:56:15 +03:00
parent 38c7faec04
commit 1fce8d0c03

View File

@ -37,7 +37,9 @@ const ToggleButtonContainer = styled.label`
`
: ""}
}
.toggle-button {
min-width: 28px;
}
.toggleText {
margin-top: 2px;
}
@ -52,7 +54,9 @@ const HiddenInput = styled.input`
const ToggleIcon = ({ isChecked }) => {
const iconName = isChecked ? "ToggleButtonCheckedIcon" : "ToggleButtonIcon";
return <>{React.createElement(Icons[iconName])}</>;
return (
<>{React.createElement(Icons[iconName], { className: "toggle-button" })}</>
);
};
class ToggleButton extends Component {