]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Disable the underlying button element when an ItemButton is disabled
authorThibG <thib@sitedethib.com>
Wed, 6 Mar 2019 14:10:32 +0000 (15:10 +0100)
committerThibaut Girka <thib@sitedethib.com>
Wed, 6 Mar 2019 21:40:17 +0000 (22:40 +0100)
Port b3668a79eca2d185ea57a9ffc2fa012db52e49f0 to glitch-soc

app/javascript/flavours/glitch/components/icon_button.js

index dfbe75110165e5e18fac011f0a917e3d50eeb8c2..6a25794d37294ed13253de87ec0be6f3bdfffd57 100644 (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}