MyCrypto/common/components/ui/HelpLink.tsx
Daniel Ternyak 7930ab6611
Revert "Upgrade to Webpack 4 (#1386)" (#1406)
This reverts commit d19c4f44e6b74fee412e69019cb2c98c876e1c8e.
2018-03-28 14:34:29 -05:00

17 lines
477 B
TypeScript

import React from 'react';
import NewTabLink, { AAttributes } from './NewTabLink';
import { HELP_ARTICLE, knowledgeBaseURL } from 'config';
interface Props {
article?: HELP_ARTICLE;
children?: string | React.ReactElement<string>;
}
const HelpLink: React.SFC<AAttributes & Props> = ({ article, children, ...rest }) => (
<NewTabLink {...rest} href={`${knowledgeBaseURL}/${article}`} onClick={this.handleClick}>
{children}
</NewTabLink>
);
export default HelpLink;