File size: 894 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
import { ExternalLink } from '@automattic/components';
import { Component } from 'react';
import InlineSupportLink from 'calypso/components/inline-support-link';
class Link extends Component {
static displayName = 'Link';
constructor( props ) {
super( props );
}
render() {
/* eslint-disable react/jsx-no-target-blank */
return (
<div className="config-elements__link guided-tours__external-link">
{ ! this.props.supportArticleId && (
<ExternalLink target="_blank" icon href={ this.props.href }>
{ this.props.children }
</ExternalLink>
) }
{ this.props.supportArticleId && (
<InlineSupportLink
supportPostId={ this.props.supportArticleId }
supportLink={ this.props.href }
>
{ this.props.children }
</InlineSupportLink>
) }
</div>
);
/* eslint-enable react/jsx-no-target-blank */
}
}
export default Link;
|