diff --git a/lib/ui/src/app.tsx b/lib/ui/src/app.tsx index 9b0302fee3ef..1027819e9449 100644 --- a/lib/ui/src/app.tsx +++ b/lib/ui/src/app.tsx @@ -61,7 +61,13 @@ const App = React.memo( if (!width || !height) { content =
; } else if (width < 600) { - content = ; + content = + ; } else { content = ( ( } ); -const Panels = React.memo((({ children, active }) => ( - +const Panels = React.memo((({ children, active, isFullscreen }) => ( + {Children.toArray(children).map((item, index) => ( // eslint-disable-next-line react/no-array-index-key @@ -92,16 +92,19 @@ const Panels = React.memo((({ children, active }) => ( ))} -)) as FunctionComponent<{ active: ActiveTabsType; children: ReactNode }>); +)) as FunctionComponent<{ active: ActiveTabsType; children: ReactNode, isFullscreen: boolean }>); Panels.displayName = 'Panels'; -const PanelsContainer = styled.div({ - position: 'fixed', - top: 0, - left: 0, - width: '100vw', - height: 'calc(100% - 40px)', -}); +const PanelsContainer = styled.div<{ isFullscreen: boolean }>( + { + position: 'fixed', + top: 0, + left: 0, + width: '100vw', + }, ({ isFullscreen }) => ({ + height: isFullscreen ? '100vh' : 'calc(100% - 40px)', + }) +); const Bar = styled.nav( { @@ -132,6 +135,7 @@ export interface MobileProps { options: { initialActive: ActiveTabsType; isToolshown: boolean; + isFullscreen: boolean; }; Sidebar: ComponentType; Preview: ComponentType; @@ -172,7 +176,7 @@ class Mobile extends Component { }} /> - +