about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/ui/components/column_link.js
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-09-09 16:41:41 +0200
committerThibG <thib@sitedethib.com>2019-09-09 19:00:20 +0200
commit2aa0cdf7e6c44f252ffbcc991a5391c31386058d (patch)
tree13035cecf4def4933ecef3a09bf3a3647f2560fc /app/javascript/flavours/glitch/features/ui/components/column_link.js
parentf154d9d6e9ca461cf608674494cb23eee6db6534 (diff)
Use the `Icon` component instead of directly using `i` tag
Diffstat (limited to 'app/javascript/flavours/glitch/features/ui/components/column_link.js')
-rw-r--r--app/javascript/flavours/glitch/features/ui/components/column_link.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/components/column_link.js b/app/javascript/flavours/glitch/features/ui/components/column_link.js
index 1b6d7d09e..d04b869b6 100644
--- a/app/javascript/flavours/glitch/features/ui/components/column_link.js
+++ b/app/javascript/flavours/glitch/features/ui/components/column_link.js
@@ -1,6 +1,7 @@
 import React from 'react';
 import PropTypes from 'prop-types';
 import { Link } from 'react-router-dom';
+import Icon from 'flavours/glitch/components/icon';
 
 const ColumnLink = ({ icon, text, to, onClick, href, method, badge }) => {
   const badgeElement = typeof badge !== 'undefined' ? <span className='column-link__badge'>{badge}</span> : null;
@@ -8,7 +9,7 @@ const ColumnLink = ({ icon, text, to, onClick, href, method, badge }) => {
   if (href) {
     return (
       <a href={href} className='column-link' data-method={method}>
-        <i className={`fa fa-fw fa-${icon} column-link__icon`} />
+        <Icon id={icon} fixedWidth className='column-link__icon' />
         {text}
         {badgeElement}
       </a>
@@ -16,7 +17,7 @@ const ColumnLink = ({ icon, text, to, onClick, href, method, badge }) => {
   } else if (to) {
     return (
       <Link to={to} className='column-link'>
-        <i className={`fa fa-fw fa-${icon} column-link__icon`} />
+        <Icon id={icon} fixedWidth className='column-link__icon' />
         {text}
         {badgeElement}
       </Link>
@@ -29,7 +30,7 @@ const ColumnLink = ({ icon, text, to, onClick, href, method, badge }) => {
     }
     return (
       <a href='#' onClick={onClick && handleOnClick} className='column-link' tabIndex='0'>
-        <i className={`fa fa-fw fa-${icon} column-link__icon`} />
+        <Icon id={icon} fixedWidth className='column-link__icon' />
         {text}
         {badgeElement}
       </a>