Refactor markdown rendering

This commit is contained in:
Kamran Ahmed
2019-11-29 18:36:49 +04:00
parent 77dab81b92
commit ebd351e133
13 changed files with 20 additions and 17 deletions

View File

@@ -0,0 +1,15 @@
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;