diff --git a/docs/src/theme/TOCCollapsible/index.js b/docs/src/theme/TOCCollapsible/index.js new file mode 100644 index 0000000000..81bfb454ae --- /dev/null +++ b/docs/src/theme/TOCCollapsible/index.js @@ -0,0 +1,3 @@ +import { TOCCollapsible } from '@swmansion/t-rex-ui'; + +export default TOCCollapsible; diff --git a/docs/src/theme/TOCItems/Tree.js b/docs/src/theme/TOCItems/Tree.js index 9d93abf1dc..4983afc968 100644 --- a/docs/src/theme/TOCItems/Tree.js +++ b/docs/src/theme/TOCItems/Tree.js @@ -1,35 +1,3 @@ -import React from 'react'; -import styles from './styles.module.css'; -import clsx from 'clsx'; -// Recursive component rendering the toc tree -function TOCItemTree({ toc, className, linkClassName, isChild }) { - if (!toc.length) { - return null; - } - return ( - - ); -} -// Memo only the tree root is enough -export default React.memo(TOCItemTree); +import { TOCItemTree } from '@swmansion/t-rex-ui'; + +export default TOCItemTree; diff --git a/docs/src/theme/TOCItems/index.js b/docs/src/theme/TOCItems/index.js new file mode 100644 index 0000000000..086bd62715 --- /dev/null +++ b/docs/src/theme/TOCItems/index.js @@ -0,0 +1,3 @@ +import { TOCItems } from '@swmansion/t-rex-ui'; + +export default TOCItems; diff --git a/docs/src/theme/TOCItems/styles.module.css b/docs/src/theme/TOCItems/styles.module.css deleted file mode 100644 index 73a184ec2f..0000000000 --- a/docs/src/theme/TOCItems/styles.module.css +++ /dev/null @@ -1,15 +0,0 @@ -.tocItems span { - font-weight: 500; - font-size: 16px; - line-height: 1.2; -} - -.tocItems a[class*='active'] span { - text-decoration: underline; - text-underline-offset: 4px; -} - -.tocItems a code { - padding: 0; - background-color: inherit; -}