Skip to content

Commit 9a767aa

Browse files
committed
Improved Playground. Added document title.
1 parent 45c52cd commit 9a767aa

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

docs/pages/playground.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1-
module.exports = require('playground-wrapper');
1+
import React from 'react';
2+
import DocumentTitle from 'react-document-title';
3+
import PlaygroundWrapper from 'playground-wrapper';
4+
5+
class Playground extends React.Component {
6+
render() {
7+
return <DocumentTitle title="Playground - Graphene">
8+
<PlaygroundWrapper />
9+
</DocumentTitle>;
10+
}
11+
}
12+
13+
module.exports = Playground;

docs/playground/wrapper.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
// require.ensure([], function(require) {
2-
// require.include('../playground/page');
3-
// });
4-
var React = require('react');
5-
class App extends React.Component {
1+
import React from 'react';
2+
3+
class PlaygroundWrapper extends React.Component {
64
constructor() {
75
super();
86
this.state = { currentComponent: null };
@@ -19,4 +17,5 @@ class App extends React.Component {
1917
return Current?<Current />:null;
2018
}
2119
}
22-
module.exports = App;
20+
21+
module.exports = PlaygroundWrapper;

0 commit comments

Comments
 (0)