Skip to content

Commit

Permalink
[@mantine/core] AppShell: Fix incorrect app safe area handling by App…
Browse files Browse the repository at this point in the history
…Shell.Footer (#6060)
  • Loading branch information
rtivital committed Apr 11, 2024
1 parent cff6b32 commit 17d1a37
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@
}

.footer {
bottom: env(safe-area-inset-bottom);
height: var(--app-shell-footer-height);
bottom: 0;
height: calc(var(--app-shell-footer-height) + env(safe-area-inset-bottom));
padding-bottom: env(safe-area-inset-bottom);
transform: var(--app-shell-footer-transform);
z-index: var(--app-shell-footer-z-index);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import { AppShell } from './AppShell';

export default { title: 'AppShell' };

const lorem = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam eget felis eget nunc Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam eget felis eget nunc Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam eget felis eget nunc`;

const longContent = Array(30).fill(lorem).join('\n\n');

export function Usage() {
const [navbarOpened, { toggle: toggleNavbar }] = useDisclosure(true);
const [navbarMobileOpened, { toggle: toggleNavbarMobile }] = useDisclosure(false);
Expand All @@ -28,7 +32,7 @@ export function Usage() {
collapsed: { desktop: !asideOpened, mobile: !asideMobileOpened },
}}
header={{
height: 0,
height: 60,
collapsed: !headerOpened,
}}
footer={{
Expand All @@ -53,7 +57,7 @@ export function Usage() {
<Button onClick={toggleAside}>Toggle aside</Button>
<Button onClick={toggleAsideMobile}>Toggle aside mobile</Button>
</Group>
<p>Other content</p>
<p>{longContent}</p>
</AppShell.Main>

<AppShell.Aside>Aside</AppShell.Aside>
Expand Down

0 comments on commit 17d1a37

Please sign in to comment.