UNPKG

standard-resume

Version:
28 lines (22 loc) 561 B
'use strict'; var React = require('react'); var FancyLink = React.createClass({ displayName: 'FancyLink', propTypes: { url: React.PropTypes.string }, render: function render() { var el = this.props.url ? React.createElement( 'a', { href: this.props.url, target: '_blank', className: 'c-fancy-link' }, this.props.children, React.createElement('div', { className: 'icon-link' }) ) : React.createElement( 'span', null, this.props.children ); return el; } }); module.exports = FancyLink;