on master help sign in
urbit.org/components/DocsSidebar.js
32 lines 1.1 kB history raw
1import Link from "next/link";
2import { useState } from "react";
3import { MenuTray } from '@urbit/foundation-design-system'
5export default function Sidebar(props) {
6 const [isOpen, setTray] = useState(false);
7 return (
8 <>
9 <div className="hidden md:flex flex-col w-96 bg-wall-100 max-h-screen h-screen">
10 <header className="flex shrink-0 justify-between items-center pl-6 pt-12 mt-5 pb-8">
11 <Link href="/" passHref>
12 <a className="font-semibold antialiased text-lg text-wall-500">Urbit</a>
13 </Link>
14 </header>
15 <div className="overflow-y-auto p-6 pt-16">
16 {props.children}
17 <div className="pb-32" />
18 </div>
19 </div>
21 <MenuTray isOpen={isOpen} setTray={setTray} search={props.search}>
22 <header className="flex shrink-0 justify-between items-center pb-8">
23 <Link href="/" passHref>
24 <a className="type-ui text-wall-500">Urbit</a>
25 </Link>
26 </header>
27 {props.children}
28 <div className="pt-64" />
29 </MenuTray>
30 </>
31 );