15 lines
266 B
JavaScript
15 lines
266 B
JavaScript
class AnchorLink extends Component {
|
|
render() {
|
|
const _props = this.props,
|
|
isExternal = _props.isExternal,
|
|
children = _props.children;
|
|
|
|
if (isExternal) {
|
|
return <a>{children}</a>;
|
|
}
|
|
|
|
return <Link>{children}</Link>;
|
|
}
|
|
|
|
}
|