diff options
author | 2021-07-27 01:31:07 -0500 | |
---|---|---|
committer | 2021-07-27 01:31:07 -0500 | |
commit | 0c46a1dab2d74d221490720572e7917cf671bae5 (patch) | |
tree | d4d959c0b1cb520d61a115832abf7931bbd7e76e /docs/src/components/DocSidebar/DocSidebar.tsx | |
parent | c14d2550b23566e236cc231e6bd51b7505bbd7b9 (diff) | |
download | astro-0c46a1dab2d74d221490720572e7917cf671bae5.tar.gz astro-0c46a1dab2d74d221490720572e7917cf671bae5.tar.zst astro-0c46a1dab2d74d221490720572e7917cf671bae5.zip |
Docs/show docsidebar on mobile (#878)
Diffstat (limited to 'docs/src/components/DocSidebar/DocSidebar.tsx')
-rw-r--r-- | docs/src/components/DocSidebar/DocSidebar.tsx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/src/components/DocSidebar/DocSidebar.tsx b/docs/src/components/DocSidebar/DocSidebar.tsx new file mode 100644 index 000000000..ebf3dbf0d --- /dev/null +++ b/docs/src/components/DocSidebar/DocSidebar.tsx @@ -0,0 +1,22 @@ +import type { FunctionalComponent } from 'preact'; +import { h } from 'preact'; +import More from './More'; +import TableOfContents from './TableOfContents'; + +export const DocSidebar: FunctionalComponent<{ + headers: any[]; + editHref: string; +}> = ({ headers = [], editHref }) => { + return ( + <nav class="sidebar-nav" aria-labelledby="sidebar-content"> + <div class="sidebar-nav-inner"> + <TableOfContents headers={headers} /> + <More editHref={editHref} /> + </div> + </nav> + ); +}; + +export default DocSidebar; +export { default as More } from './More'; +export { default as TableOfContents } from './TableOfContents'; |