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`
3838 }
3939` ;
4040
41- const FloatingActionButton = ( props ) => {
41+ const FloatingActionButton = ( { syncFileContent , offsetBottom } ) => {
4242 const isPlaying = useSelector ( ( state ) => state . ide . isPlaying ) ;
4343 const dispatch = useDispatch ( ) ;
4444
4545 return (
4646 < Button
4747 className = { classNames ( { stop : isPlaying } ) }
48- style = { { paddingLeft : isPlaying ? 0 : remSize ( 5 ) } }
48+ style = { {
49+ paddingLeft : isPlaying ? 0 : remSize ( 5 ) ,
50+ bottom : offsetBottom
51+ } }
4952 onClick = { ( ) => {
5053 if ( ! isPlaying ) {
51- props . syncFileContent ( ) ;
54+ syncFileContent ( ) ;
5255 dispatch ( startSketch ( ) ) ;
5356 } else dispatch ( stopSketch ( ) ) ;
5457 } }
@@ -59,7 +62,8 @@ const FloatingActionButton = (props) => {
5962} ;
6063
6164FloatingActionButton . propTypes = {
62- syncFileContent : PropTypes . func . isRequired
65+ syncFileContent : PropTypes . func . isRequired ,
66+ offsetBottom : PropTypes . number . isRequired
6367} ;
6468
6569export default FloatingActionButton ;
Original file line number Diff line number Diff line change @@ -208,13 +208,20 @@ const IDEView = () => {
208208 </ main >
209209 ) : (
210210 < >
211- < FloatingActionButton syncFileContent = { syncFileContent } />
211+ < FloatingActionButton
212+ syncFileContent = { syncFileContent }
213+ offsetBottom = { ide . isPlaying ? consoleSize : 0 }
214+ />
212215 < PreviewWrapper show = { ide . isPlaying } >
213216 < SplitPane
214217 style = { { position : 'static' } }
215218 split = "horizontal"
216219 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"
218225 >
219226 < PreviewFrame
220227 fullView
You can’t perform that action at this time.
0 commit comments