Skip to content

Commit

Permalink
Add MDX override components
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanWarner committed Jul 31, 2020
1 parent 878e744 commit 7bcc246
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const Header = props =>
<Link href='/'>
<a>Home</a>
</Link>
<Link href='/'>
<a>Blog</a>
<Link href='/about'>
<a>About</a>
</Link>
</Nav>

Expand Down
2 changes: 1 addition & 1 deletion src/components/HomePage/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const Wrap = ({ children }) => (
export const Main = ({ children }) => (
<main
style={{
maxWidth: '720px',
maxWidth: '700px',
padding: '0 30px',
width: '100%',
marginTop: '100px',
Expand Down
13 changes: 13 additions & 0 deletions src/components/MDXOverrideComponents.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export const p = ({ children }) => {
return (
<p
style={{
fontSize: '18px',
lineHeight: '180%',
marginBottom: '3rem'
}}
>
{children}
</p>
)
}
2 changes: 1 addition & 1 deletion src/components/PostPage/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const Wrap = ({ children }) => (
export const Main = ({ children }) => (
<main
style={{
maxWidth: '720px',
maxWidth: '700px',
width: '100%'
}}
>
Expand Down
1 change: 1 addition & 0 deletions src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ export PostSnippet from './PostSnippet'
export GitHub from './GitHub'
export HomePage from './HomePage'
export PostPage from './PostPage'
export * from './MDXOverrideComponents'
7 changes: 7 additions & 0 deletions src/pages/about.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# MDX powered About page!

Here lies some MDX.

```
const code = {}
```
5 changes: 0 additions & 5 deletions src/pages/page2.mdx

This file was deleted.

1 comment on commit 7bcc246

@vercel
Copy link

@vercel vercel bot commented on 7bcc246 Jul 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.