diff options
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'; |