Make non-link ColumnLinks behave as links
parent
20689a5b5e
commit
466df752ba
|
@ -22,8 +22,13 @@ const ColumnLink = ({ icon, text, to, onClick, href, method, badge }) => {
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
const handleOnClick = (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
return onClick(e);
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<a onClick={onClick} className='column-link' role='button' tabIndex='0' data-method={method}>
|
<a href='#' onClick={onClick && handleOnClick} className='column-link' tabIndex='0'>
|
||||||
<i className={`fa fa-fw fa-${icon} column-link__icon`} />
|
<i className={`fa fa-fw fa-${icon} column-link__icon`} />
|
||||||
{text}
|
{text}
|
||||||
{badgeElement}
|
{badgeElement}
|
||||||
|
|
Loading…
Reference in New Issue