@@ -255,7 +255,7 @@ export const EditorWrapper = styled.div`
255
255
` ;
256
256
257
257
const DeviceWrapperInner = styled ( Flex ) `
258
- margin: 20px 0 0;
258
+ margin: 2% 0 0;
259
259
.screen {
260
260
overflow: auto;
261
261
}
@@ -323,8 +323,8 @@ const DeviceWrapper = ({
323
323
const loadWrapper = async ( ) => {
324
324
if ( deviceType === "tablet" ) {
325
325
await import ( 'html5-device-mockups/dist/device-mockups.min.css' ) ;
326
- const { IPad } = await import ( "react-device-mockups" ) ;
327
- setWrapper ( ( ) => IPad ) ;
326
+ const { IPadPro } = await import ( "react-device-mockups" ) ;
327
+ setWrapper ( ( ) => IPadPro ) ;
328
328
} else if ( deviceType === "mobile" ) {
329
329
await import ( 'html5-device-mockups/dist/device-mockups.min.css' ) ;
330
330
const { IPhone7 } = await import ( "react-device-mockups" ) ;
@@ -342,20 +342,20 @@ const DeviceWrapper = ({
342
342
return 700 ;
343
343
}
344
344
if ( deviceType === 'tablet' && deviceOrientation === 'landscape' ) {
345
- return 1000 ;
345
+ return 900 ;
346
346
}
347
347
if ( deviceType === 'mobile' && deviceOrientation === 'portrait' ) {
348
- return 400 ;
348
+ return 450 ;
349
349
}
350
350
if ( deviceType === 'mobile' && deviceOrientation === 'landscape' ) {
351
- return 800 ;
351
+ return 900 ;
352
352
}
353
353
} , [ deviceType , deviceOrientation ] ) ;
354
354
355
355
if ( ! Wrapper ) return < > { children } </ > ;
356
356
357
357
return (
358
- < DeviceWrapperInner justify = "center" >
358
+ < DeviceWrapperInner justify = "center" >
359
359
< Wrapper
360
360
orientation = { deviceOrientation }
361
361
width = { deviceWidth }
@@ -488,12 +488,36 @@ function EditorView(props: EditorViewProps) {
488
488
if ( isViewMode ) return uiComp . getView ( ) ;
489
489
490
490
return (
491
- < DeviceWrapper
492
- deviceType = { editorState . deviceType }
493
- deviceOrientation = { editorState . deviceOrientation }
494
- >
495
- { uiComp . getView ( ) }
496
- </ DeviceWrapper >
491
+ editorState . deviceType === "mobile" || editorState . deviceType === "tablet" ? (
492
+ < div style = { {
493
+ display : "flex" ,
494
+ flexDirection : "row" , // Arrange side by side
495
+ gap : "20px" , // Spacing between the two DeviceWrappers
496
+ justifyContent : "center" , // Center horizontally
497
+ alignItems : "center" , // Center vertically
498
+ height : "auto" , // Full viewport height for vertical centering
499
+ width : "100%" , // Full viewport width
500
+
501
+ } } >
502
+ < DeviceWrapper
503
+ deviceType = { editorState . deviceType }
504
+ deviceOrientation = "portrait"
505
+ >
506
+ { uiComp . getView ( ) }
507
+ </ DeviceWrapper >
508
+
509
+ < DeviceWrapper
510
+ deviceType = { editorState . deviceType }
511
+ deviceOrientation = "landscape"
512
+ >
513
+ { uiComp . getView ( ) }
514
+ </ DeviceWrapper >
515
+ </ div >
516
+ ) : (
517
+ < div >
518
+ { uiComp . getView ( ) }
519
+ </ div >
520
+ )
497
521
)
498
522
} , [
499
523
uiComp ,
0 commit comments