feat(docs): migrate documentation site into monorepo (#5912)
This commit is contained in:
1 parent
3e464a76f2
commit
9e421c67bd
605 files changed
+26764
-219
No files matched your search
@@ -0,0 +1,21 @@
|
||||
import React, { type ReactNode } from "react";
|
||||
import clsx from "clsx";
|
||||
import TOCItems from "@theme/TOCItems";
|
||||
import type { Props } from "@theme/TOC";
|
||||
|
||||
import styles from "./styles.module.css";
|
||||
import { Carbon } from "@site/src/components/carbon";
|
||||
|
||||
// Using a custom className
|
||||
// This prevents TOCInline/TOCCollapsible getting highlighted by mistake
|
||||
const LINK_CLASS_NAME = "table-of-contents__link toc-highlight";
|
||||
const LINK_ACTIVE_CLASS_NAME = "table-of-contents__link--active";
|
||||
|
||||
export default function TOC({ className, ...props }: Props): ReactNode {
|
||||
return (
|
||||
<div className={clsx(styles.tableOfContents, "thin-scrollbar", className)}>
|
||||
<TOCItems {...props} linkClassName={LINK_CLASS_NAME} linkActiveClassName={LINK_ACTIVE_CLASS_NAME} />
|
||||
<Carbon />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
.tableOfContents {
|
||||
max-height: calc(100vh - (var(--ifm-navbar-height) + 2rem));
|
||||
overflow-y: auto;
|
||||
position: sticky;
|
||||
top: calc(var(--ifm-navbar-height) + 1rem);
|
||||
}
|
||||
|
||||
@media (max-width: 996px) {
|
||||
.tableOfContents {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.docItemContainer {
|
||||
padding: 0 0.3rem;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user