Skip to content

Commit dab8481

Browse files
committed
Advanced section
1 parent 26ba5c6 commit dab8481

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

components/SideBar.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from "react";
22
import styled from "styled-components";
3-
import ReactMarkdown from "react-markdown";
43
import Link from "next/link";
54
import { useRouter } from "next/router";
65

@@ -13,6 +12,11 @@ const CATEGORIES = [
1312
{ name: "FormTextArea", url: "/docs/FormTextArea" },
1413
{ name: "FormSelect", url: "/docs/FormSelect" },
1514
{ name: "FormError", url: "/docs/FormError" },
15+
],
16+
},
17+
{
18+
category: "Advanced",
19+
items: [
1620
{ name: "Field toggling", url: "/docs/Toggling-a-field" },
1721
{ name: "Object fields", url: "/docs/Object-fields" },
1822
{ name: "Array fields", url: "/docs/Array-fields" },
@@ -59,11 +63,15 @@ const CATEGORIES = [
5963
const Container = styled.div`
6064
position: sticky;
6165
top: 1em;
66+
max-height: 90vh;
67+
overflow: auto;
68+
padding: 0 1em 0 0;
6269
`;
6370

6471
const Item = styled.a<{ current: boolean }>`
6572
display: block;
6673
padding: 0.4em 0.8em;
74+
6775
color: #111;
6876
border-bottom: 1px solid #0002;
6977
cursor: pointer;

pages/docs/[doc].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default function DocPage(props: Props) {
2626
return (
2727
<>
2828
<NavBar />
29-
<CenterContainer style={{ margin: "2em 0" }}>
29+
<CenterContainer style={{ margin: "2em 0.5em" }}>
3030
<Container>
3131
<div>
3232
<SideBar />

0 commit comments

Comments
 (0)