about summary refs log tree commit diff
path: root/app/javascript/mastodon/components/attachment_list.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/components/attachment_list.js
parent3383ed7573866f086ac49b0e975d5c502cdf4b89 (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/components/attachment_list.js')
-rw-r--r--app/javascript/mastodon/components/attachment_list.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/javascript/mastodon/components/attachment_list.js b/app/javascript/mastodon/components/attachment_list.js
index 8e5bb0e0b..5dfa1464c 100644
--- a/app/javascript/mastodon/components/attachment_list.js
+++ b/app/javascript/mastodon/components/attachment_list.js
@@ -2,6 +2,7 @@ import React from 'react';
 import ImmutablePropTypes from 'react-immutable-proptypes';
 import PropTypes from 'prop-types';
 import ImmutablePureComponent from 'react-immutable-pure-component';
+import Icon from 'mastodon/components/icon';
 
 const filename = url => url.split('/').pop().split('#')[0].split('?')[0];
 
@@ -24,7 +25,7 @@ export default class AttachmentList extends ImmutablePureComponent {
 
               return (
                 <li key={attachment.get('id')}>
-                  <a href={displayUrl} target='_blank' rel='noopener'><i className='fa fa-link' /> {filename(displayUrl)}</a>
+                  <a href={displayUrl} target='_blank' rel='noopener'><Icon id='link' /> {filename(displayUrl)}</a>
                 </li>
               );
             })}
@@ -36,7 +37,7 @@ export default class AttachmentList extends ImmutablePureComponent {
     return (
       <div className='attachment-list'>
         <div className='attachment-list__icon'>
-          <i className='fa fa-link' />
+          <Icon id='link' />
         </div>
 
         <ul className='attachment-list__list'>