Skip to content

Commit

Permalink
feat: add component heading
Browse files Browse the repository at this point in the history
  • Loading branch information
timglaser committed Jun 2, 2020
1 parent bc9c46e commit abc122b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/templates/ReferenceTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const ReferenceTemplate = ({ data }) => {
const [isOpen, setIsOpen] = useState(false);
const { mdx } = data;
const { frontmatter } = mdx;
const { title, description } = frontmatter;
const { title, description, component } = frontmatter;

return (
<Layout>
Expand All @@ -26,7 +26,9 @@ const ReferenceTemplate = ({ data }) => {
isOpen={isOpen}
toggle={() => setIsOpen(!isOpen)}
/>
<main className={styles.content}>The main page content goes here</main>
<main className={styles.content}>
<h1>{component}</h1>
</main>
</Container>
</Layout>
);
Expand Down

0 comments on commit abc122b

Please sign in to comment.