File tree Expand file tree Collapse file tree 4 files changed +22
-14
lines changed Expand file tree Collapse file tree 4 files changed +22
-14
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import React from 'react';
2
2
import ReactDOM from 'react-dom' ;
3
3
4
4
class PreviewFrame extends React . Component {
5
-
5
+
6
6
componentDidMount ( ) {
7
7
if ( this . props . isPlaying ) {
8
8
this . renderFrameContents ( ) ;
@@ -57,8 +57,8 @@ class PreviewFrame extends React.Component {
57
57
}
58
58
59
59
render ( ) {
60
- return < iframe className = "preview-frame" frameBorder = "0" sandbox = "allow-scripts allow-pointer-lock allow-same-origin allow-popups allow-modals allow-forms" > </ iframe > ;
60
+ return < iframe className = "preview-frame" frameBorder = "0" sandbox = "allow-scripts allow-pointer-lock allow-same-origin allow-popups allow-modals allow-forms" title = "sketch output" > </ iframe > ;
61
61
}
62
62
}
63
63
64
- export default PreviewFrame ;
64
+ export default PreviewFrame ;
Original file line number Diff line number Diff line change @@ -12,21 +12,23 @@ class Toolbar extends React.Component {
12
12
"toolbar__play-button" : true ,
13
13
"playing" : this . props . isPlaying
14
14
} ) ;
15
+ let stopButtonClass = classNames ( {
16
+ "toolbar__stop-button" : true ,
17
+ "stopped" : ! this . props . isPlaying
18
+ } ) ;
15
19
16
20
return (
17
21
< div className = "toolbar" >
18
22
< img className = "toolbar__logo" src = { logoUrl } />
19
- < div className = { playButtonClass } onClick = { this . props . startSketch } >
23
+ < button className = { playButtonClass } onClick = { this . props . startSketch } >
20
24
< Isvg src = { playUrl } alt = "Play Sketch" />
21
- </ div >
22
- { this . props . isPlaying ?
23
- < div className = "toolbar__stop-button" onClick = { this . props . stopSketch } >
24
- < Isvg src = { stopUrl } alt = "Stop Sketch" />
25
- </ div >
26
- : null }
25
+ </ button >
26
+ < button className = { stopButtonClass } onClick = { this . props . stopSketch } >
27
+ < Isvg src = { stopUrl } alt = "Stop Sketch" />
28
+ </ button >
27
29
</ div >
28
30
) ;
29
31
}
30
32
}
31
33
32
- export default Toolbar ;
34
+ export default Toolbar ;
Original file line number Diff line number Diff line change 6
6
width : #{44 / $base-font-size } rem;
7
7
text-align : center ;
8
8
border-radius : 100% ;
9
-
10
9
line-height : #{50 / $base-font-size } rem;
11
10
cursor : pointer ;
11
+ border : none ;
12
12
13
13
& g {
14
14
fill : $light-toolbar-button-color ;
22
22
fill : $light-button-hover-color ;
23
23
}
24
24
}
25
- }
25
+ }
Original file line number Diff line number Diff line change 11
11
12
12
.toolbar__stop-button {
13
13
@extend %toolbar-button ;
14
+ & .stopped {
15
+ background-color : $light-button-background-hover-color ;
16
+ & g {
17
+ fill : $light-button-hover-color ;
18
+ }
19
+ }
14
20
}
15
21
16
22
.toolbar__logo {
20
26
.toolbar {
21
27
padding : #{20 / $base-font-size } rem #{60 / $base-font-size } rem;
22
28
display : flex ;
23
- }
29
+ }
You can’t perform that action at this time.
0 commit comments