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:
Yangshun Tay 2019-10-10 15:12:17 -07:00 committed by GitHub
parent ae678c9dad
commit 1c5a6ee244
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 75 additions and 55 deletions

View file

@ -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}) => (