diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-12-12 14:27:52 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-12-12 14:27:52 +0100 |
commit | 6d1066fe61984f6e5b226a79bb801aa765453d83 (patch) | |
tree | a29096d787bd3e20a1012865181d5bc58b96e305 /app/assets/javascripts/components/features/ui | |
parent | 6e7e97c8492be61d6a4a04bc4e83d916ac69ec05 (diff) |
Adding some navigation items from #262 to the getting started screen
Diffstat (limited to 'app/assets/javascripts/components/features/ui')
-rw-r--r-- | app/assets/javascripts/components/features/ui/components/column_link.jsx | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/app/assets/javascripts/components/features/ui/components/column_link.jsx b/app/assets/javascripts/components/features/ui/components/column_link.jsx new file mode 100644 index 000000000..a2f7c13a6 --- /dev/null +++ b/app/assets/javascripts/components/features/ui/components/column_link.jsx @@ -0,0 +1,41 @@ +import { Link } from 'react-router'; + +const outerStyle = { + display: 'block', + padding: '15px', + fontSize: '16px', + color: '#fff', + textDecoration: 'none' +}; + +const iconStyle = { + display: 'inline-block', + marginRight: '5px' +}; + +const ColumnLink = ({ icon, text, to, href }) => { + if (href) { + return ( + <a href={href} style={outerStyle} className='column-link'> + <i className={`fa fa-fw fa-${icon}`} style={iconStyle} /> + {text} + </a> + ); + } else { + return ( + <Link to={to} style={outerStyle} className='column-link'> + <i className={`fa fa-fw fa-${icon}`} style={iconStyle} /> + {text} + </Link> + ); + } +}; + +ColumnLink.propTypes = { + icon: React.PropTypes.string.isRequired, + text: React.PropTypes.string.isRequired, + to: React.PropTypes.string, + href: React.PropTypes.string +}; + +export default ColumnLink; |