mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-06 21:03:47 +02:00
misc(v2): make playground nicer (#1819)
* misc(v2): make code block nicer * misc(v2): update changelog for code + playground * misc(v2): update playground docs
This commit is contained in:
parent
ae678c9dad
commit
1c5a6ee244
13 changed files with 75 additions and 55 deletions
|
@ -8,7 +8,7 @@
|
|||
import React, {useEffect, useState, useRef} from 'react';
|
||||
import classnames from 'classnames';
|
||||
import Highlight, {defaultProps} from 'prism-react-renderer';
|
||||
import nightOwlTheme from 'prism-react-renderer/themes/nightOwl';
|
||||
import defaultTheme from 'prism-react-renderer/themes/palenight';
|
||||
import Clipboard from 'clipboard';
|
||||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
||||
import styles from './styles.module.css';
|
||||
|
@ -52,7 +52,7 @@ export default ({children, className: languageClassName}) => {
|
|||
return (
|
||||
<Highlight
|
||||
{...defaultProps}
|
||||
theme={prismTheme || nightOwlTheme}
|
||||
theme={prismTheme || defaultTheme}
|
||||
code={children.trim()}
|
||||
language={language}>
|
||||
{({className, style, tokens, getLineProps, getTokenProps}) => (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue