Skip to content

Commit

Permalink
docs(v2): Fix examples by importing React (#4297)
Browse files Browse the repository at this point in the history
  • Loading branch information
roydukkey authored Feb 26, 2021
1 parent a810c4a commit 12afb9e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions website/docs/using-themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ Here is an example to display some text just above the footer, with minimal code
```js title="src/theme/Footer.js"
// Note: importing from "@theme/Footer" would fail due to the file importing itself
import OriginalFooter from '@theme-original/Footer';
import React from 'react';

export default function Footer(props) {
return (
Expand All @@ -162,6 +163,7 @@ Here's an example of using this feature to enhance the default theme `CodeBlock`

```js
import InitialCodeBlock from '@theme-init/CodeBlock';
import React from 'react';

export default function CodeBlock(props) {
return props.live ? (
Expand Down

0 comments on commit 12afb9e

Please sign in to comment.