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