refactor(theme-classic): multiple re-arrangements (#7273)

* refactor(theme-classic): enforce collocated JSX and module CSS

* refactor
This commit is contained in:
Joshua Chen 2022-04-30 12:29:54 +08:00 committed by GitHub
parent 355a22907d
commit 710f898703
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 40 additions and 25 deletions

View file

@ -10,7 +10,7 @@ import React from 'react';
import {useDocsSidebar} from '@docusaurus/theme-common';
import clsx from 'clsx';
import styles from './Main.module.css';
import styles from './styles.module.css';
import type {Props} from '@theme/DocPage/Layout/Main';
export default function DocPageLayoutMain({

View file

@ -10,7 +10,7 @@ import IconArrow from '@theme/IconArrow';
import {translate} from '@docusaurus/Translate';
import type {Props} from '@theme/DocPage/Layout/Sidebar/ExpandButton';
import styles from './ExpandButton.module.css';
import styles from './styles.module.css';
export default function DocPageLayoutSidebarExpandButton({
toggleSidebar,

View file

@ -9,7 +9,6 @@ import React from 'react';
import type {Props} from '@theme/TOCItems/Tree';
// Recursive component rendering the toc tree
/* eslint-disable jsx-a11y/control-has-associated-label */
function TOCItemTree({
toc,
className,
@ -23,6 +22,7 @@ function TOCItemTree({
<ul className={isChild ? undefined : className}>
{toc.map((heading) => (
<li key={heading.id}>
{/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}
<a
href={`#${heading.id}`}
className={linkClassName ?? undefined}