diff --git a/app/javascript/flavours/glitch/components/icon.js b/app/javascript/flavours/glitch/components/icon.js
index 8f55a0115..d8a17722f 100644
--- a/app/javascript/flavours/glitch/components/icon.js
+++ b/app/javascript/flavours/glitch/components/icon.js
@@ -1,26 +1,21 @@
-// Package imports.
-import classNames from 'classnames';
-import PropTypes from 'prop-types';
import React from 'react';
+import PropTypes from 'prop-types';
+import classNames from 'classnames';
+
+export default class Icon extends React.PureComponent {
+
+ static propTypes = {
+ id: PropTypes.string.isRequired,
+ className: PropTypes.string,
+ fixedWidth: PropTypes.bool,
+ };
+
+ render () {
+ const { id, className, fixedWidth, ...other } = this.props;
+
+ return (
+
+ );
+ }
-// This just renders a FontAwesome icon.
-export default function Icon ({
- className,
- fullwidth,
- icon,
-}) {
- const computedClass = classNames('icon', 'fa', { 'fa-fw': fullwidth }, `fa-${icon}`, className);
- return icon ? (
-
- ) : null;
}
-
-// Props.
-Icon.propTypes = {
- className: PropTypes.string,
- fullwidth: PropTypes.bool,
- icon: PropTypes.string,
-};
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}
>
-
+