Address design issues and set theme at device level

This commit is contained in:
Jorik Schellekens 2020-06-11 12:27:09 +01:00
parent 0f685eb0e9
commit cf392af52f
5 changed files with 39 additions and 11 deletions

View file

@ -29,9 +29,16 @@ export default class StyledRadioButton extends React.PureComponent<IProps, IStat
}
public render() {
const { children, className, ...otherProps } = this.props;
return <label className={classnames('mx_RadioButton', className)}>
<input type='radio' {...otherProps} />
const { children, className, disabled, ...otherProps } = this.props;
const _className = classnames(
'mx_RadioButton',
className,
{
"mx_RadioButton_disabled": disabled,
"mx_RadioButton_enabled": !disabled,
});
return <label className={_className}>
<input type='radio' disabled={disabled} {...otherProps} />
{/* Used to render the radio button circle */}
<div><div></div></div>
<span>{children}</span>