diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-09-09 15:28:45 +0200 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2019-09-09 19:00:20 +0200 |
commit | f154d9d6e9ca461cf608674494cb23eee6db6534 (patch) | |
tree | 13384a3c89cb9abc9bff0e7019c9c1cbb56f5fd3 /app/javascript/flavours/glitch/components/icon_button.js | |
parent | f2b307af25ca53f062f1a9e50dc1724b7550fd71 (diff) |
Use upstream's Icon component
Rework the codebase to avoid unnecessary differences with upstream
Diffstat (limited to 'app/javascript/flavours/glitch/components/icon_button.js')
-rw-r--r-- | app/javascript/flavours/glitch/components/icon_button.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/components/icon_button.js b/app/javascript/flavours/glitch/components/icon_button.js index 521353238..6247f4571 100644 --- a/app/javascript/flavours/glitch/components/icon_button.js +++ b/app/javascript/flavours/glitch/components/icon_button.js @@ -3,6 +3,7 @@ import Motion from 'flavours/glitch/util/optional_motion'; import spring from 'react-motion/lib/spring'; import PropTypes from 'prop-types'; import classNames from 'classnames'; +import Icon from 'flavours/glitch/components/icon'; export default class IconButton extends React.PureComponent { @@ -133,7 +134,7 @@ export default class IconButton extends React.PureComponent { tabIndex={tabIndex} disabled={disabled} > - <i className={`fa fa-fw fa-${icon}`} aria-hidden='true' /> + <Icon id={icon} fixedWidth aria-hidden='true' /> </button> ); } @@ -155,7 +156,7 @@ export default class IconButton extends React.PureComponent { tabIndex={tabIndex} disabled={disabled} > - <i style={{ transform: `rotate(${rotate}deg)` }} className={`fa fa-fw fa-${icon}`} aria-hidden='true' /> + <Icon id={icon} style={{ transform: `rotate(${rotate}deg)` }} fixedWidth aria-hidden='true' /> {this.props.label} </button>) } |