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 11import React from 'react' ;
22import styled from 'styled-components' ;
3+ import classNames from 'classnames' ;
34import { useDispatch , useSelector } from 'react-redux' ;
45import PropTypes from 'prop-types' ;
56import PlayIcon from '../../../images/triangle-arrow-right.svg' ;
67import StopIcon from '../../../images/stop.svg' ;
78import { prop , remSize } from '../../../theme' ;
89import { startSketch , stopSketch } from '../actions/ide' ;
910
10- const Button = styled . div `
11+ const Button = styled . button `
1112 position: fixed;
1213 right: ${ remSize ( 20 ) } ;
1314 bottom: ${ remSize ( 20 ) } ;
1415 height: ${ remSize ( 60 ) } ;
1516 width: ${ remSize ( 60 ) } ;
1617 z-index: 3;
17- cursor: pointer ;
18+ padding: 0 ;
1819 ${ prop ( 'Button.secondary.default' ) } ;
1920 aspect-ratio: 1/1;
2021 border-radius: 99999px;
2122 display: flex;
2223 justify-content: center;
2324 align-items: center;
2425 box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
25- &[data-behaviour=' stop'] {
26+ &. stop {
2627 ${ prop ( 'Button.primary.default' ) }
2728 g {
2829 fill: ${ prop ( 'Button.primary.default.foreground' ) } ;
@@ -43,7 +44,7 @@ const FloatingActionButton = (props) => {
4344
4445 return (
4546 < Button
46- data-behaviour = { isPlaying ? ' stop' : 'run' }
47+ className = { classNames ( { stop : isPlaying } ) }
4748 style = { { paddingLeft : isPlaying ? 0 : remSize ( 5 ) } }
4849 onClick = { ( ) => {
4950 if ( ! isPlaying ) {
You can’t perform that action at this time.
0 commit comments