docusaurus/packages/docusaurus-theme-classic/src/theme/TOCInline/index.tsx
2022-02-24 17:25:17 +08:00

29 lines
725 B
TypeScript

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import type {Props} from '@theme/TOCInline';
import styles from './styles.module.css';
import TOCItems from '@theme/TOCItems';
export default function TOCInline({
toc,
minHeadingLevel,
maxHeadingLevel,
}: Props): JSX.Element {
return (
<div className={styles.tableOfContentsInline}>
<TOCItems
toc={toc}
minHeadingLevel={minHeadingLevel}
maxHeadingLevel={maxHeadingLevel}
className="table-of-contents"
linkClassName={null}
/>
</div>
);
}