import React from 'react'; import { ColorTokens } from '../../foundation/Colors'; import { TypographyTokens } from '../../foundation/Typography'; import { Typography } from '../Typography'; import { ExternalLinkStyled } from './ExternalLink.styled'; import { ReactComponent as LinkArrow } from './link-arrow.svg'; type ExternalLinkProps = { activeColorToken?: ColorTokens; children: string; className?: string; colorToken: ColorTokens; disabled?: boolean; disabledColorToken?: ColorTokens; hideArrowIcon?: boolean; hoverColorToken?: ColorTokens; href: string; id?: string; onClick?: () => void; typographyToken: TypographyTokens; }; export const ExternalLink: React.FunctionComponent = ({ activeColorToken, onClick, hoverColorToken, hideArrowIcon, className, id, disabled, href, children, colorToken, typographyToken, disabledColorToken, }) => { if (disabled) { return ( {children} ); } return ( {children} {hideArrowIcon ? null : } ); };