diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-02-01 00:14:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-01 00:14:05 +0100 |
commit | 1f9519020296c8c24a73d3f99d3c1ad94a627f3b (patch) | |
tree | 730245deccb6258eaddf9a013d377cd33ea2667b /app/javascript/mastodon/features/compose/components/search.js | |
parent | 3383ed7573866f086ac49b0e975d5c502cdf4b89 (diff) |
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
Diffstat (limited to 'app/javascript/mastodon/features/compose/components/search.js')
-rw-r--r-- | app/javascript/mastodon/features/compose/components/search.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/javascript/mastodon/features/compose/components/search.js b/app/javascript/mastodon/features/compose/components/search.js index d203d8780..1ab197ac5 100644 --- a/app/javascript/mastodon/features/compose/components/search.js +++ b/app/javascript/mastodon/features/compose/components/search.js @@ -5,6 +5,7 @@ import Overlay from 'react-overlays/lib/Overlay'; import Motion from '../../ui/util/optional_motion'; import spring from 'react-motion/lib/spring'; import { searchEnabled } from '../../../initial_state'; +import Icon from 'mastodon/components/icon'; const messages = defineMessages({ placeholder: { id: 'search.placeholder', defaultMessage: 'Search' }, @@ -116,8 +117,8 @@ class Search extends React.PureComponent { </label> <div role='button' tabIndex='0' className='search__icon' onClick={this.handleClear}> - <i className={`fa fa-search ${hasValue ? '' : 'active'}`} /> - <i aria-label={intl.formatMessage(messages.placeholder)} className={`fa fa-times-circle ${hasValue ? 'active' : ''}`} /> + <Icon id='search' className={hasValue ? '' : 'active'} /> + <Icon id='times-circle' className={hasValue ? 'active' : ''} aria-label={intl.formatMessage(messages.placeholder)} /> </div> <Overlay show={expanded && !hasValue} placement='bottom' target={this}> |