diff --git a/src/app/components/app-shell/SystemBarShell.test.tsx b/src/app/components/app-shell/SystemBarShell.test.tsx index 0e1d8e730..844818935 100644 --- a/src/app/components/app-shell/SystemBarShell.test.tsx +++ b/src/app/components/app-shell/SystemBarShell.test.tsx @@ -27,7 +27,7 @@ describe('SystemBarShell', () => { const mutationObserver = vi.fn<() => void>(); vi.stubGlobal('MutationObserver', mutationObserver); - render( + const { container } = render( void>()}>
Content
@@ -35,5 +35,9 @@ describe('SystemBarShell', () => { expect(mockOsType).not.toHaveBeenCalled(); expect(mutationObserver).not.toHaveBeenCalled(); + expect(container.querySelector('[data-system-bar-position="top"]')).toHaveStyle({ + height: 'var(--safe-area-inset-top, env(safe-area-inset-top, 0px))', + }); + expect(container.querySelector('[data-system-bar-position="bottom"]')).not.toBeInTheDocument(); }); }); diff --git a/src/app/components/app-shell/SystemBarShell.tsx b/src/app/components/app-shell/SystemBarShell.tsx index 47edd6a33..dcd448766 100644 --- a/src/app/components/app-shell/SystemBarShell.tsx +++ b/src/app/components/app-shell/SystemBarShell.tsx @@ -99,16 +99,19 @@ function useBarColor( } type SystemBarStripProps = { + edge: 'top' | 'bottom'; size: string; background: string; stripRef?: RefObject; transition?: string; }; -function SystemBarStrip({ size, background, stripRef, transition }: SystemBarStripProps) { +function SystemBarStrip({ edge, size, background, stripRef, transition }: SystemBarStripProps) { return (