diff --git a/src/templates/ApiDocTemplate.js b/src/templates/ApiDocTemplate.js index 7ddbb21af..0f5840ab5 100644 --- a/src/templates/ApiDocTemplate.js +++ b/src/templates/ApiDocTemplate.js @@ -10,7 +10,7 @@ import MethodReference from '../components/MethodReference'; import Sidebar from '../components/Sidebar'; import SEO from '../components/Seo'; import pages from '../data/sidenav.json'; -import styles from './ApiDocTemplate.module.scss'; +import templateStyles from './ReferenceTemplate.module.scss'; import useApiDoc from '../hooks/useApiDoc'; const ApiDocTemplate = ({ data }) => { @@ -24,27 +24,29 @@ const ApiDocTemplate = ({ data }) => { return ( - + setIsOpen(!isOpen)} /> -
+

{api}

-
+
-
+

Usage

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

API methods

{methods.map((method, i) => ( diff --git a/src/templates/ComponentDocTemplate.js b/src/templates/ComponentDocTemplate.js index f591c9172..a5f9d3f3e 100644 --- a/src/templates/ComponentDocTemplate.js +++ b/src/templates/ComponentDocTemplate.js @@ -13,6 +13,7 @@ import SEO from '../components/Seo'; import PropList from '../components/PropList'; import pages from '../data/sidenav.json'; import styles from './ComponentDocTemplate.module.scss'; +import templateStyles from './ReferenceTemplate.module.scss'; import useComponentDoc from '../hooks/useComponentDoc'; const previewStyles = { @@ -39,27 +40,29 @@ const ComponentDocTemplate = ({ data }) => { return ( - + setIsOpen(!isOpen)} /> -
+

{component}

-
+
-
+

Usage

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

Examples

{examples.map((example, i) => ( @@ -75,13 +78,13 @@ const ComponentDocTemplate = ({ data }) => {
)} -
+

Props

{methods.length > 0 && ( -
+

Methods

{methods.map((method, i) => ( diff --git a/src/templates/ComponentDocTemplate.module.scss b/src/templates/ComponentDocTemplate.module.scss index 1e21bd266..887a5965d 100644 --- a/src/templates/ComponentDocTemplate.module.scss +++ b/src/templates/ComponentDocTemplate.module.scss @@ -1,45 +1,7 @@ -.container { - display: grid; - grid-template-columns: auto 3fr; - grid-column-gap: 2rem; - grid-template-areas: 'sidebar main'; - - @media (max-width: 760px) { - grid-template-columns: none; - grid-template-areas: 'sidebar' 'main'; - } -} - -.content { - grid-area: main; -} - -.sidebar { - grid-area: sidebar; -} - .componentExample:not(:last-child) { margin-bottom: 2rem; } -.description { - border-top: 1px solid var(--color-neutrals-200); - margin-top: 0.5rem; - padding-top: 0.5rem; - - ul { - padding-top: 0.5rem; - } - - li { - margin: 0; - } -} - -.section:not(:last-child) { - margin-bottom: 2rem; -} - .toastManager > div { position: fixed; top: 0; diff --git a/src/templates/ApiDocTemplate.module.scss b/src/templates/ReferenceTemplate.module.scss similarity index 100% rename from src/templates/ApiDocTemplate.module.scss rename to src/templates/ReferenceTemplate.module.scss