Files
developer-roadmap/components/mdx-components/a.js

15 lines
302 B
JavaScript
Raw Normal View History

2019-11-02 17:50:57 +04:00
import styled from 'styled-components';
const Link = styled.a`
font-weight: 600;
`;
const EnrichedLink = props => {
return (
<Link href={ props.href } target={ /^http(s)?:\/\//.test(props.href) ? '_blank' : '_self' }>
{ props.children }
</Link>
);
};
export default EnrichedLink;