diff --git a/components/md-renderer/index.tsx b/components/md-renderer/index.tsx index ef46aa2c1..43774dcd7 100644 --- a/components/md-renderer/index.tsx +++ b/components/md-renderer/index.tsx @@ -1,7 +1,9 @@ import React from 'react'; // @ts-ignore import { MDXProvider } from '@mdx-js/react'; +import { ChakraProvider } from '@chakra-ui/react'; import MdxComponents from './mdx-components'; +import { roadmapTheme } from '../../lib/theme'; type MdRendererType = { children: React.ReactNode @@ -9,8 +11,10 @@ type MdRendererType = { export default function MdRenderer(props: MdRendererType) { return ( - - {props.children} - + + + {props.children} + + ); }; diff --git a/components/md-renderer/mdx-components/a.tsx b/components/md-renderer/mdx-components/a.tsx index 3a2601927..93ad530cd 100644 --- a/components/md-renderer/mdx-components/a.tsx +++ b/components/md-renderer/mdx-components/a.tsx @@ -1,18 +1,26 @@ import React from 'react'; -import { Link } from '@chakra-ui/react'; +import styled from 'styled-components'; type EnrichedLinkProps = { href: string; children: React.ReactNode } -export default function EnrichedLink(props: EnrichedLinkProps) { +const Link = styled.a` + font-weight: 600; + text-decoration: underline; +`; + +const EnrichedLink = (props: EnrichedLinkProps) => { // Is external URL or is a media URL const isExternalUrl = /(^http(s)?:\/\/)|(\.(png|svg|jpeg|jpg)$)/.test(props.href); return ( - + {props.children} ); }; + +export default EnrichedLink; + diff --git a/components/md-renderer/mdx-components/iframe.tsx b/components/md-renderer/mdx-components/iframe.tsx index d1036eb7b..fb2333f57 100644 --- a/components/md-renderer/mdx-components/iframe.tsx +++ b/components/md-renderer/mdx-components/iframe.tsx @@ -1,13 +1,40 @@ -import { AspectRatio } from '@chakra-ui/react'; +import styled from 'styled-components'; type IFrameProps = { title: string; src: string; }; +const AspectRatioBox = styled.div` + position: relative; + max-width: 100%; + margin-bottom: 18px; + + &:before { + height: 0; + content: ""; + display: block; + padding-bottom: 50%; + } + + & > iframe { + overflow: hidden; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 100%; + } +`; + export default function IFrame(props: IFrameProps) { return ( - +