File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -38,17 +38,20 @@ const Button = styled.button`
38
38
}
39
39
` ;
40
40
41
- const FloatingActionButton = ( props ) => {
41
+ const FloatingActionButton = ( { syncFileContent , offsetBottom } ) => {
42
42
const isPlaying = useSelector ( ( state ) => state . ide . isPlaying ) ;
43
43
const dispatch = useDispatch ( ) ;
44
44
45
45
return (
46
46
< Button
47
47
className = { classNames ( { stop : isPlaying } ) }
48
- style = { { paddingLeft : isPlaying ? 0 : remSize ( 5 ) } }
48
+ style = { {
49
+ paddingLeft : isPlaying ? 0 : remSize ( 5 ) ,
50
+ bottom : offsetBottom
51
+ } }
49
52
onClick = { ( ) => {
50
53
if ( ! isPlaying ) {
51
- props . syncFileContent ( ) ;
54
+ syncFileContent ( ) ;
52
55
dispatch ( startSketch ( ) ) ;
53
56
} else dispatch ( stopSketch ( ) ) ;
54
57
} }
@@ -59,7 +62,8 @@ const FloatingActionButton = (props) => {
59
62
} ;
60
63
61
64
FloatingActionButton . propTypes = {
62
- syncFileContent : PropTypes . func . isRequired
65
+ syncFileContent : PropTypes . func . isRequired ,
66
+ offsetBottom : PropTypes . number . isRequired
63
67
} ;
64
68
65
69
export default FloatingActionButton ;
Original file line number Diff line number Diff line change @@ -208,13 +208,20 @@ const IDEView = () => {
208
208
</ main >
209
209
) : (
210
210
< >
211
- < FloatingActionButton syncFileContent = { syncFileContent } />
211
+ < FloatingActionButton
212
+ syncFileContent = { syncFileContent }
213
+ offsetBottom = { ide . isPlaying ? consoleSize : 0 }
214
+ />
212
215
< PreviewWrapper show = { ide . isPlaying } >
213
216
< SplitPane
214
217
style = { { position : 'static' } }
215
218
split = "horizontal"
216
219
primary = "second"
217
- minSize = { 200 }
220
+ size = { ide . consoleIsExpanded ? consoleSize : 29 }
221
+ minSize = { 29 }
222
+ onChange = { ( size ) => setConsoleSize ( size ) }
223
+ allowResize = { ide . consoleIsExpanded }
224
+ className = "editor-preview-subpanel"
218
225
>
219
226
< PreviewFrame
220
227
fullView
You can’t perform that action at this time.
0 commit comments