diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Container/index.tsx b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Container/index.tsx index a44675a602e2..293d700dad35 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Container/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Container/index.tsx @@ -28,7 +28,7 @@ export default function CodeBlockContainer({ className={clsx( props.className, styles.codeBlockContainer, - ThemeClassNames.common.codeBlock.container, + ThemeClassNames.common.codeBlock, )} /> ); diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/index.tsx b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/index.tsx index 12bee480f12b..84b4fd0c407a 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/index.tsx @@ -7,7 +7,6 @@ import React from 'react'; import clsx from 'clsx'; -import {ThemeClassNames} from '@docusaurus/theme-common'; import type {Props} from '@theme/CodeBlock/Line'; import styles from './styles.module.css'; @@ -31,7 +30,7 @@ export default function CodeBlockLine({ lineProps.className = clsx( lineProps.className, styles.highlightedCodeLine, - ThemeClassNames.common.codeBlock.highlightedCodeLine, + 'theme-code-block-highlighted-line', ); } diff --git a/packages/docusaurus-theme-common/src/utils/ThemeClassNames.ts b/packages/docusaurus-theme-common/src/utils/ThemeClassNames.ts index 65d72429067b..ec3ffc11a969 100644 --- a/packages/docusaurus-theme-common/src/utils/ThemeClassNames.ts +++ b/packages/docusaurus-theme-common/src/utils/ThemeClassNames.ts @@ -39,10 +39,7 @@ export const ThemeClassNames = { editThisPage: 'theme-edit-this-page', lastUpdated: 'theme-last-updated', backToTopButton: 'theme-back-to-top-button', - codeBlock: { - container: 'theme-code-block', - highlightedCodeLine: 'theme-code-block-highlighted-line', - }, + codeBlock: 'theme-code-block', }, layout: { // TODO add other stable classNames here