mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-04 01:09:20 +02:00
refactor(theme-classic): multiple re-arrangements (#7273)
* refactor(theme-classic): enforce collocated JSX and module CSS * refactor
This commit is contained in:
parent
355a22907d
commit
710f898703
9 changed files with 40 additions and 25 deletions
|
@ -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({
|
|
@ -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,
|
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue