|
|
|
@ -1,7 +1,6 @@ |
|
|
|
|
import { Link } from 'react-router'; |
|
|
|
|
|
|
|
|
|
const outerStyle = { |
|
|
|
|
display: 'block', |
|
|
|
|
padding: '15px', |
|
|
|
|
fontSize: '16px', |
|
|
|
|
textDecoration: 'none' |
|
|
|
@ -12,17 +11,17 @@ const iconStyle = { |
|
|
|
|
marginRight: '5px' |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const ColumnLink = ({ icon, text, to, href, method }) => { |
|
|
|
|
const ColumnLink = ({ icon, text, to, href, method, hideOnMobile }) => { |
|
|
|
|
if (href) { |
|
|
|
|
return ( |
|
|
|
|
<a href={href} style={outerStyle} className='column-link' data-method={method}> |
|
|
|
|
<a href={href} style={outerStyle} className={`column-link ${hideOnMobile ? 'hidden-on-mobile' : ''}`} data-method={method}> |
|
|
|
|
<i className={`fa fa-fw fa-${icon}`} style={iconStyle} /> |
|
|
|
|
{text} |
|
|
|
|
</a> |
|
|
|
|
); |
|
|
|
|
} else { |
|
|
|
|
return ( |
|
|
|
|
<Link to={to} style={outerStyle} className='column-link'> |
|
|
|
|
<Link to={to} style={outerStyle} className={`column-link ${hideOnMobile ? 'hidden-on-mobile' : ''}`}> |
|
|
|
|
<i className={`fa fa-fw fa-${icon}`} style={iconStyle} /> |
|
|
|
|
{text} |
|
|
|
|
</Link> |
|
|
|
@ -35,7 +34,8 @@ ColumnLink.propTypes = { |
|
|
|
|
text: React.PropTypes.string.isRequired, |
|
|
|
|
to: React.PropTypes.string, |
|
|
|
|
href: React.PropTypes.string, |
|
|
|
|
method: React.PropTypes.string |
|
|
|
|
method: React.PropTypes.string, |
|
|
|
|
hideOnMobile: React.PropTypes.bool |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export default ColumnLink; |
|
|
|
|