mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-03 19:32:35 +02:00
feat(v2): Provide typing to most of the theme-classic components (#3348)
* feat(v2): Provide typing to most of the theme-classic components * Expose type to the end users and dogfood it in v2 website
This commit is contained in:
parent
658dac7d42
commit
bd9b6618c1
31 changed files with 440 additions and 125 deletions
|
@ -14,6 +14,7 @@ import copy from 'copy-text-to-clipboard';
|
|||
import rangeParser from 'parse-numeric-range';
|
||||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
||||
import usePrismTheme from '@theme/hooks/usePrismTheme';
|
||||
import type {Props} from '@theme/CodeBlock';
|
||||
|
||||
import styles from './styles.module.css';
|
||||
|
||||
|
@ -91,11 +92,7 @@ export default ({
|
|||
children,
|
||||
className: languageClassName,
|
||||
metastring,
|
||||
}: {
|
||||
children: string;
|
||||
className: string;
|
||||
metastring: string;
|
||||
}): JSX.Element => {
|
||||
}: Props): JSX.Element => {
|
||||
const {
|
||||
siteConfig: {
|
||||
themeConfig: {prism = {}},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue