From 11d156e950e42763b896e5ba22d05ef0b27183d0 Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Wed, 29 Jul 2020 19:03:45 -0700 Subject: [PATCH] feat: use PageLayout for ApiReferenceTemplate --- src/templates/ApiReferenceTemplate.js | 93 ++++++++++++++------------- 1 file changed, 48 insertions(+), 45 deletions(-) diff --git a/src/templates/ApiReferenceTemplate.js b/src/templates/ApiReferenceTemplate.js index 136d5eb40..857dbd8d5 100644 --- a/src/templates/ApiReferenceTemplate.js +++ b/src/templates/ApiReferenceTemplate.js @@ -3,7 +3,7 @@ import cx from 'classnames'; import { graphql } from 'gatsby'; import PropTypes from 'prop-types'; import { CodeBlock } from '@newrelic/gatsby-theme-newrelic'; -import PageTitle from '../components/PageTitle'; +import PageLayout from '../components/PageLayout'; import Markdown from '../components/Markdown'; import MethodReference from '../components/MethodReference'; import TypeDefReference from '../components/TypeDefReference'; @@ -28,55 +28,58 @@ const ApiReferenceTemplate = ({ data }) => { return ( <> - {api} - - {apiDescription && ( -
+ + + {apiDescription && ( +
+ +
)} - > - -
- )} -
-

Usage

- {usage} -
+
+

Usage

+ {usage} +
- {methods.length > 0 && ( -
-

API methods

- {methods.map((method, i) => ( - - ))} -
- )} + {methods.length > 0 && ( +
+

API methods

+ {methods.map((method, i) => ( + + ))} +
+ )} - {typeDefs.length > 0 && ( -
-

Type definitions

- {typeDefs.map((typeDef, i) => ( - - ))} -
- )} + {typeDefs.length > 0 && ( +
+

Type definitions

+ {typeDefs.map((typeDef, i) => ( + + ))} +
+ )} - {constants.length > 0 && ( -
-

Constants

- {constants.map((constant, i) => ( - - ))} -
- )} + {constants.length > 0 && ( +
+

Constants

+ {constants.map((constant, i) => ( + + ))} +
+ )} + + ); };