File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed
docs/client/components/PlaygroundPage Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ class PlaygroundWithPreview extends React.Component {
33
33
render ( ) {
34
34
const {
35
35
activeComponent,
36
+ expandDocumentation,
37
+ isDocumentationOn,
36
38
} = this . props ;
37
39
38
40
return (
@@ -44,7 +46,11 @@ class PlaygroundWithPreview extends React.Component {
44
46
< Playground
45
47
code = { this . props . defaultCode }
46
48
onChange = { this . handleOnChangeCode }
49
+ activeComponent = { activeComponent }
50
+ expandDocumentation = { expandDocumentation }
51
+ isDocumentationOn = { isDocumentationOn }
47
52
/>
53
+
48
54
< Preview
49
55
code = { this . state . code }
50
56
/>
Original file line number Diff line number Diff line change 5
5
.header {
6
6
font-size : 24px ;
7
7
font-weight : bold ;
8
+ margin-bottom : 20px ;
8
9
}
9
10
}
10
11
11
12
:local(.playground ) {
12
13
position : fixed ;
13
14
width : 40% ;
14
15
height : 100% ;
15
- border : 1px solid ;
16
+ .doc-enabler {
17
+ margin : 40px auto ;
18
+ width : 40% ;
19
+ .switch {
20
+ margin-left : 10px ;
21
+ margin-top : 10px ;
22
+ }
23
+ }
16
24
}
17
25
18
26
:local(.preview ) {
24
32
left : 55% ;
25
33
width : 35% ;
26
34
height : 100% ;
27
- border : 1px solid ;
28
35
}
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ class PlaygroundPage extends React.Component {
9
9
this . state = {
10
10
isDocumentationOn : false ,
11
11
activeComponent : '' ,
12
+ activeDocs : '' ,
12
13
} ;
13
14
this . expandDocumentation = this . expandDocumentation . bind ( this ) ;
14
15
this . handleClickComponent = this . handleClickComponent . bind ( this ) ;
@@ -20,10 +21,12 @@ class PlaygroundPage extends React.Component {
20
21
} ) ;
21
22
}
22
23
23
- handleClickComponent ( activeComponent , defaultCode ) {
24
+ handleClickComponent ( activeComponent , defaultCode , activeDocs ) {
25
+ console . log ( 'activeDocs ' , activeDocs ) ;
24
26
this . setState ( {
25
27
activeComponent,
26
28
defaultCode,
29
+ activeDocs,
27
30
} ) ;
28
31
}
29
32
You can’t perform that action at this time.
0 commit comments