Skip to content

Commit

Permalink
feat: update api and component reference templates to use the code bl…
Browse files Browse the repository at this point in the history
…ock for usage
  • Loading branch information
jerelmiller committed Jul 8, 2020
1 parent 1bceb66 commit 45e319a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 47 deletions.
43 changes: 0 additions & 43 deletions src/components/InlineCodeSnippet.js

This file was deleted.

4 changes: 2 additions & 2 deletions src/templates/ApiReferenceTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import cx from 'classnames';
import { graphql } from 'gatsby';
import PropTypes from 'prop-types';
import InlineCodeSnippet from '../components/InlineCodeSnippet';
import CodeBlock from '../components/CodeBlock';
import Layout from '../components/Layout';
import PageTitle from '../components/PageTitle';
import Markdown from '../components/Markdown';
Expand Down Expand Up @@ -45,7 +45,7 @@ const ApiReferenceTemplate = ({ data }) => {

<section className={templateStyles.section}>
<h2 className={templateStyles.sectionTitle}>Usage</h2>
<InlineCodeSnippet language="js">{usage}</InlineCodeSnippet>
<CodeBlock language="js">{usage}</CodeBlock>
</section>

{methods.length > 0 && (
Expand Down
4 changes: 2 additions & 2 deletions src/templates/ComponentReferenceTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import cx from 'classnames';
import { graphql } from 'gatsby';
import PropTypes from 'prop-types';

import InlineCodeSnippet from '../components/InlineCodeSnippet';
import CodeBlock from '../components/CodeBlock';
import ReferenceExample from '../components/ReferenceExample';
import Layout from '../components/Layout';
import PageTitle from '../components/PageTitle';
Expand Down Expand Up @@ -63,7 +63,7 @@ const ComponentReferenceTemplate = ({ data }) => {

<section className={templateStyles.section}>
<h2 className={templateStyles.sectionTitle}>Usage</h2>
<InlineCodeSnippet language="js">{usage}</InlineCodeSnippet>
<CodeBlock language="js">{usage}</CodeBlock>
</section>

{examples.length > 0 && (
Expand Down

0 comments on commit 45e319a

Please sign in to comment.