[Glitch] Disable the underlying button element when an ItemButton is disabled

Port b3668a79ec to glitch-soc
shrike
ThibG 2019-03-06 15:10:32 +01:00 committed by Thibaut Girka
parent cf4fd8bcfe
commit 6e295beab2
1 changed files with 2 additions and 0 deletions

View File

@ -107,6 +107,7 @@ export default class IconButton extends React.PureComponent {
onClick={this.handleClick}
style={style}
tabIndex={tabIndex}
disabled={disabled}
>
<i className={`fa fa-fw fa-${icon}`} aria-hidden='true' />
</button>
@ -125,6 +126,7 @@ export default class IconButton extends React.PureComponent {
onClick={this.handleClick}
style={style}
tabIndex={tabIndex}
disabled={disabled}
>
<i style={{ transform: `rotate(${rotate}deg)` }} className={`fa fa-fw fa-${icon}`} aria-hidden='true' />
{this.props.label}