{() => {
- return
;
+ return (
+
+
+
+ );
}}
diff --git a/platform/ui/src/components/Typography/Typography.mdx b/platform/ui/src/components/Typography/Typography.mdx
index 21ec5fc79..a45ddbf33 100644
--- a/platform/ui/src/components/Typography/Typography.mdx
+++ b/platform/ui/src/components/Typography/Typography.mdx
@@ -21,30 +21,32 @@ import { Typography } from '@ohfi/ui';
## Basic usage
-
- h1. The five boxing wizards jump quickly.
-
-
- h2. The five boxing wizards jump quickly.
-
-
- h3. The five boxing wizards jump quickly.
-
-
- h4. The five boxing wizards jump quickly.
-
-
- h5. The five boxing wizards jump quickly.
-
-
- h6. The five boxing wizards jump quickly.
-
-
- subtitle. The five boxing wizards jump quickly.
-
-
- body. The five boxing wizards jump quickly.
-
+
+
+ h1. The five boxing wizards jump quickly.
+
+
+ h2. The five boxing wizards jump quickly.
+
+
+ h3. The five boxing wizards jump quickly.
+
+
+ h4. The five boxing wizards jump quickly.
+
+
+ h5. The five boxing wizards jump quickly.
+
+
+ h6. The five boxing wizards jump quickly.
+
+
+ subtitle. The five boxing wizards jump quickly.
+
+
+ body. The five boxing wizards jump quickly.
+
+
## Changing the HTML element
@@ -55,9 +57,11 @@ a semantic element. The style of a Typography is independent of the semantic
element.
-
- This is a h2 using the h1 styles.
-
+
+
+ This is a h2 using the h1 styles.
+
+
## Properties
diff --git a/platform/ui/src/gatsby-theme-docz/components/Header/index.js b/platform/ui/src/gatsby-theme-docz/components/Header/index.js
new file mode 100644
index 000000000..928056749
--- /dev/null
+++ b/platform/ui/src/gatsby-theme-docz/components/Header/index.js
@@ -0,0 +1,69 @@
+/** @jsx jsx */
+import { jsx, Box, Flex, useColorMode } from 'theme-ui';
+import { useConfig, useCurrentDoc } from 'docz';
+
+import * as styles from 'gatsby-theme-docz/src/components/Header/styles';
+import {
+ Edit,
+ Menu,
+ Sun,
+ Github,
+} from 'gatsby-theme-docz/src/components/Icons';
+import { Logo } from 'gatsby-theme-docz/src/components/Logo';
+
+export const Header = props => {
+ const { onOpen } = props;
+ const {
+ repository,
+ themeConfig: { showDarkModeSwitch, showMarkdownEditButton },
+ } = useConfig();
+ const { edit = true, ...doc } = useCurrentDoc();
+ const [colorMode, setColorMode] = useColorMode();
+
+ const toggleColorMode = () => {
+ setColorMode(colorMode === 'light' ? 'dark' : 'light');
+ };
+
+ return (
+
+
+
+
+
+
+
+
+
+ {repository && (
+
+
+
+
+
+ )}
+ {showDarkModeSwitch && (
+
+
+
+ )}
+
+ {showMarkdownEditButton && edit && doc.link && (
+
+
+ Edit page
+
+ )}
+
+
+ );
+};
diff --git a/platform/ui/src/gatsby-theme-docz/components/Layout/index.js b/platform/ui/src/gatsby-theme-docz/components/Layout/index.js
new file mode 100644
index 000000000..c22eb568a
--- /dev/null
+++ b/platform/ui/src/gatsby-theme-docz/components/Layout/index.js
@@ -0,0 +1,50 @@
+/** @jsx jsx */
+import { useRef, useState } from 'react';
+import { jsx, Layout as BaseLayout, Main } from 'theme-ui';
+import classnames from 'classnames';
+
+import { Header } from '../Header';
+import { Sidebar } from '../Sidebar';
+import * as styles from 'gatsby-theme-docz/src/components/Layout/styles';
+
+const getSidebarStatus = () =>
+ typeof window !== 'undefined' && window.location.pathname === '/';
+
+export const Layout = ({ children }) => {
+ const [sidebarOpen, setSidebarOpen] = useState(getSidebarStatus());
+ const nav = useRef();
+
+ const handleSidebarToggle = () => {
+ setSidebarOpen(s => !s);
+ };
+
+ return (
+
div': { flex: '1 1 auto' } }} data-testid="layout">
+
+
+
+
setSidebarOpen(true)}
+ onBlur={() => setSidebarOpen(false)}
+ onClick={() => setSidebarOpen(false)}
+ />
+
+ {children}
+
+
+
+
+ );
+};
diff --git a/platform/ui/src/gatsby-theme-docz/components/Sidebar/index.js b/platform/ui/src/gatsby-theme-docz/components/Sidebar/index.js
new file mode 100644
index 000000000..b96620bf4
--- /dev/null
+++ b/platform/ui/src/gatsby-theme-docz/components/Sidebar/index.js
@@ -0,0 +1,79 @@
+/** @jsx jsx */
+/** @jsxFrag React.Fragment */
+import React, { useState, useRef, useEffect } from 'react';
+import classnames from 'classnames';
+
+import { jsx } from 'theme-ui';
+import { useMenus, useCurrentDoc } from 'docz';
+
+import { NavSearch } from 'gatsby-theme-docz/src/components/NavSearch';
+import { NavLink } from 'gatsby-theme-docz/src/components/NavLink';
+import { NavGroup } from 'gatsby-theme-docz/src/components/NavGroup';
+
+export const Sidebar = React.forwardRef((props, ref) => {
+ const [query, setQuery] = useState('');
+ const menus = useMenus({ query });
+ const currentDoc = useCurrentDoc();
+ const currentDocRef = useRef();
+ const handleChange = ev => {
+ setQuery(ev.target.value);
+ };
+ useEffect(() => {
+ if (ref.current && currentDocRef.current) {
+ ref.current.scrollTo(0, currentDocRef.current.offsetTop);
+ }
+ }, [ref]);
+
+ return (
+ <>
+ {props.sidebarOpen && (
+ <>
+
+
props.onClick()}
+ className="fixed z-10 left-0 w-full h-full bg-black opacity-80"
+ style={{ top: '81px' }}
+ />
+
+
+
+ {menus &&
+ menus.map(menu => {
+ if (!menu.route)
+ return (
+
+ );
+ if (menu.route === currentDoc.route) {
+ return (
+
+ {menu.name}
+
+ );
+ }
+ return (
+
+ {menu.name}
+
+ );
+ })}
+
+ >
+ )}
+ >
+ );
+});
diff --git a/platform/ui/src/gatsby-theme-docz/theme.css b/platform/ui/src/gatsby-theme-docz/theme.css
index caf0f44da..853f65234 100644
--- a/platform/ui/src/gatsby-theme-docz/theme.css
+++ b/platform/ui/src/gatsby-theme-docz/theme.css
@@ -3,7 +3,6 @@
*/
[data-testid='live-preview'] {
- padding: 10px;
background: #000;
}
diff --git a/platform/ui/src/views/StudyList/StudyList.mdx b/platform/ui/src/views/StudyList/StudyList.mdx
index cad5ff505..f18d36b5e 100644
--- a/platform/ui/src/views/StudyList/StudyList.mdx
+++ b/platform/ui/src/views/StudyList/StudyList.mdx
@@ -1,7 +1,7 @@
---
name: Study List
menu: Views
-route: components/studyList
+route: views/studyList
---
import { Playground, Props } from 'docz';
diff --git a/platform/ui/tailwind.config.js b/platform/ui/tailwind.config.js
index 62fc1193d..cc940a717 100644
--- a/platform/ui/tailwind.config.js
+++ b/platform/ui/tailwind.config.js
@@ -166,6 +166,9 @@ module.exports = {
'48': '12rem',
'56': '14rem',
'64': '16rem',
+ '72': '18rem',
+ '80': '20rem',
+ '250px': '250px',
},
backgroundColor: theme => theme('colors'),
backgroundPosition: {