mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-29 18:27:56 +02:00
refactor(theme-classic): always collocate stylesheets with components in one folder (#7415)
This commit is contained in:
parent
3f110a36bd
commit
c17d745533
15 changed files with 11 additions and 9 deletions
|
@ -12,7 +12,7 @@ import type {Props} from '@theme/DocPage/Layout/Sidebar';
|
|||
import ExpandButton from '@theme/DocPage/Layout/Sidebar/ExpandButton';
|
||||
|
||||
import clsx from 'clsx';
|
||||
import styles from './index.module.css';
|
||||
import styles from './styles.module.css';
|
||||
|
||||
import {ThemeClassNames, useDocsSidebar} from '@docusaurus/theme-common';
|
||||
|
||||
|
|
|
@ -11,11 +11,10 @@ import BackToTopButton from '@theme/BackToTopButton';
|
|||
import type {Props} from '@theme/DocPage/Layout';
|
||||
import DocPageLayoutSidebar from '@theme/DocPage/Layout/Sidebar';
|
||||
import DocPageLayoutMain from '@theme/DocPage/Layout/Main';
|
||||
|
||||
import styles from './index.module.css';
|
||||
|
||||
import {useDocsSidebar} from '@docusaurus/theme-common';
|
||||
|
||||
import styles from './styles.module.css';
|
||||
|
||||
export default function DocPageLayout({children}: Props): JSX.Element {
|
||||
const sidebar = useDocsSidebar();
|
||||
const [hiddenSidebarContainer, setHiddenSidebarContainer] = useState(false);
|
||||
|
|
|
@ -10,7 +10,7 @@ import clsx from 'clsx';
|
|||
import {ThemeClassNames} from '@docusaurus/theme-common';
|
||||
import type {Props} from '@theme/DocSidebarItem/Html';
|
||||
|
||||
import styles from './Html.module.css';
|
||||
import styles from './styles.module.css';
|
||||
|
||||
export default function DocSidebarItemHtml({
|
||||
item,
|
|
@ -14,7 +14,7 @@ import IconExternalLink from '@theme/IconExternalLink';
|
|||
|
||||
import type {Props} from '@theme/DocSidebarItem/Link';
|
||||
|
||||
import styles from './Link.module.css';
|
||||
import styles from './styles.module.css';
|
||||
|
||||
export default function DocSidebarItemLink({
|
||||
item,
|
|
@ -7,9 +7,10 @@
|
|||
|
||||
import React from 'react';
|
||||
import type {Props} from '@theme/MDXComponents/Img';
|
||||
import styles from './Img.module.css';
|
||||
import clsx from 'clsx';
|
||||
|
||||
import styles from './styles.module.css';
|
||||
|
||||
function transformImgClassName(className?: string): string {
|
||||
return clsx(className, styles.img);
|
||||
}
|
|
@ -8,9 +8,10 @@
|
|||
import React from 'react';
|
||||
import clsx from 'clsx';
|
||||
import Translate from '@docusaurus/Translate';
|
||||
import styles from './CollapseButton.module.css';
|
||||
import type {Props} from '@theme/TOCCollapsible/CollapseButton';
|
||||
|
||||
import styles from './styles.module.css';
|
||||
|
||||
export default function TOCCollapsibleCollapseButton({
|
||||
collapsed,
|
||||
...props
|
|
@ -8,11 +8,12 @@
|
|||
import React from 'react';
|
||||
import clsx from 'clsx';
|
||||
import {useCollapsible, Collapsible} from '@docusaurus/theme-common';
|
||||
import styles from './index.module.css';
|
||||
import TOCItems from '@theme/TOCItems';
|
||||
import type {Props} from '@theme/TOCCollapsible';
|
||||
import CollapseButton from '@theme/TOCCollapsible/CollapseButton';
|
||||
|
||||
import styles from './styles.module.css';
|
||||
|
||||
export default function TOCCollapsible({
|
||||
toc,
|
||||
className,
|
||||
|
|
Loading…
Add table
Reference in a new issue