import React from "react"; import {ExternalLinkGraphic} from "./styles"; import {trackExternalLink} from "../../utils/track"; type ExternalLinkProps = { graphic?: string; href: string; anchorTitle?: string; }; const ExternalLink: React.FC = ({ children, graphic, href, anchorTitle, }) => { return ( { trackLink(href); }} > {children} {graphic && ( )} ); }; export default ExternalLink; function trackLink(href) { trackExternalLink(href); }