Web: Components: add PropType label and margin text

This commit is contained in:
Nikita Gopienko 2019-08-01 14:19:43 +03:00
parent 514b8ee4b3
commit d546461b30

View File

@ -15,19 +15,19 @@ const DisableCss = css`
const ToggleContainer = styled.label`
position: absolute;
-webkit-appearance: none;
outline: none;
margin: 0;
display: flex;
align-items: center;
outline: none;
user-select: none;
-moz-user-select: none;
-o-user-select: none;
-webkit-user-select: none;
.svg {
margin-right: 8px;
}
svg {
margin-right: 8px;
}
${props => props.isDisabled ?
css`
@ -36,7 +36,7 @@ const ToggleContainer = styled.label`
${DisableCss}
}
`
: css`
: css`
cursor: pointer;
`
};
@ -103,7 +103,8 @@ class ToggleButton extends Component {
ToggleButton.propTypes = {
isChecked: PropTypes.bool.isRequired,
isDisabled: PropTypes.bool,
onChange: PropTypes.func
onChange: PropTypes.func,
label: PropTypes.label
};
export default ToggleButton;