0
0
Fork 0

Refactor icons in web UI to use Icon component (#9951)

* Refactor uses of icons to an Icon component in web UI

* Refactor options passed to the Icon component

* Make tests work with absolute component paths
This commit is contained in:
Eugen Rochko 2019-02-01 00:14:05 +01:00 committed by GitHub
parent 3383ed7573
commit 1f95190202
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 147 additions and 82 deletions

View file

@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Icon from 'mastodon/components/icon';
export default class ColumnHeader extends React.PureComponent {
@ -21,7 +22,7 @@ export default class ColumnHeader extends React.PureComponent {
let iconElement = '';
if (icon) {
iconElement = <i className={`fa fa-fw fa-${icon} column-header__icon`} />;
iconElement = <Icon id={icon} fixedWidth className='column-header__icon' />;
}
return (