From 082dee381011f0a8737ccb8097a45ea924ffe1e3 Mon Sep 17 00:00:00 2001 From: Luca Cras Date: Mon, 4 Apr 2022 13:00:04 +0200 Subject: [PATCH 1/4] show fullscreen button on mobile UI and, when in fullscreen mode, hide the nav UI --- lib/ui/src/components/layout/mobile.tsx | 9 +++++---- lib/ui/src/components/preview/toolbar.tsx | 16 +++++++--------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/lib/ui/src/components/layout/mobile.tsx b/lib/ui/src/components/layout/mobile.tsx index 8c9bb6213413..84c93ed42b64 100644 --- a/lib/ui/src/components/layout/mobile.tsx +++ b/lib/ui/src/components/layout/mobile.tsx @@ -103,21 +103,21 @@ const PanelsContainer = styled.div({ height: 'calc(100% - 40px)', }); -const Bar = styled.nav( +const Bar = styled.nav<{ isFullscreen: boolean }>( { position: 'fixed', bottom: 0, left: 0, width: '100vw', height: 40, - display: 'flex', boxShadow: '0 1px 5px 0 rgba(0, 0, 0, 0.1)', '& > *': { flex: 1, }, }, - ({ theme }) => ({ + ({ theme, isFullscreen }) => ({ + display: isFullscreen ? 'none' : 'flex', background: theme.barBg, }) ); @@ -132,6 +132,7 @@ export interface MobileProps { options: { initialActive: ActiveTabsType; isToolshown: boolean; + isFullscreen: boolean; }; Sidebar: ComponentType; Preview: ComponentType; @@ -186,7 +187,7 @@ class Mobile extends Component {