File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
client/modules/IDE/components Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import styled from 'styled-components' ;
3
+ import classNames from 'classnames' ;
3
4
import { useDispatch , useSelector } from 'react-redux' ;
4
5
import PropTypes from 'prop-types' ;
5
6
import PlayIcon from '../../../images/triangle-arrow-right.svg' ;
6
7
import StopIcon from '../../../images/stop.svg' ;
7
8
import { prop , remSize } from '../../../theme' ;
8
9
import { startSketch , stopSketch } from '../actions/ide' ;
9
10
10
- const Button = styled . div `
11
+ const Button = styled . button `
11
12
position: fixed;
12
13
right: ${ remSize ( 20 ) } ;
13
14
bottom: ${ remSize ( 20 ) } ;
14
15
height: ${ remSize ( 60 ) } ;
15
16
width: ${ remSize ( 60 ) } ;
16
17
z-index: 3;
17
- cursor: pointer ;
18
+ padding: 0 ;
18
19
${ prop ( 'Button.secondary.default' ) } ;
19
20
aspect-ratio: 1/1;
20
21
border-radius: 99999px;
21
22
display: flex;
22
23
justify-content: center;
23
24
align-items: center;
24
25
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
25
- &[data-behaviour=' stop'] {
26
+ &. stop {
26
27
${ prop ( 'Button.primary.default' ) }
27
28
g {
28
29
fill: ${ prop ( 'Button.primary.default.foreground' ) } ;
@@ -43,7 +44,7 @@ const FloatingActionButton = (props) => {
43
44
44
45
return (
45
46
< Button
46
- data-behaviour = { isPlaying ? ' stop' : 'run' }
47
+ className = { classNames ( { stop : isPlaying } ) }
47
48
style = { { paddingLeft : isPlaying ? 0 : remSize ( 5 ) } }
48
49
onClick = { ( ) => {
49
50
if ( ! isPlaying ) {
You can’t perform that action at this time.
0 commit comments