feat(v2): composition syntax highlighting & live code editors (#1555)

* feat(v2): composition syntax highlighting & react-live playground

* mobile friendly tweak

* refactor styling

* revert docs
This commit is contained in:
Endi 2019-06-04 15:59:51 +07:00 committed by GitHub
parent 246c1814c0
commit 305a4f0a29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 287 additions and 84 deletions

View file

@ -6,11 +6,13 @@
*/
import React from 'react';
import {MDXProvider} from '@mdx-js/react';
import Head from '@docusaurus/Head';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import withBaseUrl from '@docusaurus/withBaseUrl';
import Navbar from '@theme/Navbar';
import Footer from '@theme/Footer';
import MDXComponents from '@theme/MDXComponents';
import './styles.css';
@ -30,7 +32,7 @@ function Layout(props) {
)}
</Head>
<Navbar />
{children}
<MDXProvider components={MDXComponents}>{children}</MDXProvider>
{!noFooter && <Footer />}
</React.Fragment>
);