aboutsummaryrefslogtreecommitdiff
path: root/app/javascript/mastodon/features/compose/components/upload.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-02-01 00:14:05 +0100
committerGitHub <noreply@github.com>2019-02-01 00:14:05 +0100
commit1f9519020296c8c24a73d3f99d3c1ad94a627f3b (patch)
tree730245deccb6258eaddf9a013d377cd33ea2667b /app/javascript/mastodon/features/compose/components/upload.js
parent3383ed7573866f086ac49b0e975d5c502cdf4b89 (diff)
downloadmastodon-1f9519020296c8c24a73d3f99d3c1ad94a627f3b.tar
mastodon-1f9519020296c8c24a73d3f99d3c1ad94a627f3b.tar.gz
mastodon-1f9519020296c8c24a73d3f99d3c1ad94a627f3b.tar.bz2
mastodon-1f9519020296c8c24a73d3f99d3c1ad94a627f3b.zip
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/upload.js')
-rw-r--r--app/javascript/mastodon/features/compose/components/upload.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/javascript/mastodon/features/compose/components/upload.js b/app/javascript/mastodon/features/compose/components/upload.js
index a1e99dcbb..038d7ee28 100644
--- a/app/javascript/mastodon/features/compose/components/upload.js
+++ b/app/javascript/mastodon/features/compose/components/upload.js
@@ -6,6 +6,7 @@ import spring from 'react-motion/lib/spring';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import classNames from 'classnames';
+import Icon from 'mastodon/components/icon';
const messages = defineMessages({
description: { id: 'upload_form.description', defaultMessage: 'Describe for the visually impaired' },
@@ -99,8 +100,8 @@ class Upload extends ImmutablePureComponent {
{({ scale }) => (
<div className='compose-form__upload-thumbnail' style={{ transform: `scale(${scale})`, backgroundImage: `url(${media.get('preview_url')})`, backgroundPosition: `${x}% ${y}%` }}>
<div className={classNames('compose-form__upload__actions', { active })}>
- <button className='icon-button' onClick={this.handleUndoClick}><i className='fa fa-times' /> <FormattedMessage id='upload_form.undo' defaultMessage='Delete' /></button>
- {media.get('type') === 'image' && <button className='icon-button' onClick={this.handleFocalPointClick}><i className='fa fa-crosshairs' /> <FormattedMessage id='upload_form.focus' defaultMessage='Crop' /></button>}
+ <button className='icon-button' onClick={this.handleUndoClick}><Icon id='times' /> <FormattedMessage id='upload_form.undo' defaultMessage='Delete' /></button>
+ {media.get('type') === 'image' && <button className='icon-button' onClick={this.handleFocalPointClick}><Icon id='crosshairs' /> <FormattedMessage id='upload_form.focus' defaultMessage='Crop' /></button>}
</div>
<div className={classNames('compose-form__upload-description', { active })}>