aboutsummaryrefslogtreecommitdiff
path: root/app/javascript/mastodon/features/status/components/card.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/status/components/card.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/status/components/card.js')
-rw-r--r--app/javascript/mastodon/features/status/components/card.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/javascript/mastodon/features/status/components/card.js b/app/javascript/mastodon/features/status/components/card.js
index 8491299ef..8237de84d 100644
--- a/app/javascript/mastodon/features/status/components/card.js
+++ b/app/javascript/mastodon/features/status/components/card.js
@@ -4,6 +4,7 @@ import Immutable from 'immutable';
import ImmutablePropTypes from 'react-immutable-proptypes';
import punycode from 'punycode';
import classnames from 'classnames';
+import Icon from 'mastodon/components/icon';
const IDNA_PREFIX = 'xn--';
@@ -175,8 +176,8 @@ export default class Card extends React.PureComponent {
<div className='status-card__actions'>
<div>
- <button onClick={this.handleEmbedClick}><i className={`fa fa-${iconVariant}`} /></button>
- {horizontal && <a href={card.get('url')} target='_blank' rel='noopener'><i className='fa fa-external-link' /></a>}
+ <button onClick={this.handleEmbedClick}><Icon id={iconVariant} /></button>
+ {horizontal && <a href={card.get('url')} target='_blank' rel='noopener'><Icon id='external-link' /></a>}
</div>
</div>
</div>
@@ -198,7 +199,7 @@ export default class Card extends React.PureComponent {
} else {
embed = (
<div className='status-card__image'>
- <i className='fa fa-file-text' />
+ <Icon id='file-text' />
</div>
);
}