-
Notifications
You must be signed in to change notification settings - Fork 27.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add nicer styles and example content
- Loading branch information
Showing
4 changed files
with
52 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
export default function TestComponent({ name = 'world' }) { | ||
return <div>Hello, {name}!</div> | ||
return ( | ||
<> | ||
<div>Hello, {name}!</div> | ||
<style jsx>{` | ||
div { | ||
background-color: #111; | ||
border-radius: 0.5em; | ||
color: #fff; | ||
margin-bottom: 1.5em; | ||
padding: 0.5em 0.75em; | ||
} | ||
`}</style> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
--- | ||
title: Example Post | ||
description: This frontmatter description will appear below the title | ||
--- | ||
|
||
This is an example post, with a [link](https://nextjs.org) and a React component: | ||
|
||
<TestComponent name="next-mdx-remote" /> | ||
|
||
The title and description are pulled from the MDX file and processed using `gray-matter`. Additionally, links are rendered using a custom component passed to `next-mdx-remote`. | ||
|
||
Go back [home](/). |