Skip to content

Commit 183b5f2

Browse files
committed
fix: restore reveal and sticky behaviors by removing global padding
1 parent f9a1b26 commit 183b5f2

3 files changed

Lines changed: 5 additions & 7 deletions

File tree

packages/react/__tests__/Header.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ describe("Header", () => {
7676
expect(header?.className).not.toContain("sticky");
7777
});
7878

79-
it("renders fixed header with fixed positioning", () => {
79+
it("renders fixed header with sticky positioning", () => {
8080
const { container } = renderHeader({ behavior: "fixed" });
8181
const header = container.querySelector("header");
82-
expect(header?.className).toContain("fixed");
82+
expect(header?.className).toContain("sticky");
8383
});
8484
});
8585

packages/react/src/AppShell.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ function AppShellInner({ safeArea = false, className, children }: AppShellProps)
3838
});
3939

4040
return (
41-
<div
42-
className={cn("flex min-h-dvh flex-col relative", className)}
43-
style={{ paddingTop: "var(--header-height, 0px)" }}
44-
>
41+
<div className={cn("flex min-h-dvh flex-col relative", className)}>
4542
{header}
4643
<SafeArea edges={["bottom"]} className="flex flex-col flex-1">
4744
{otherChildren}

packages/react/src/Header.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,11 @@ export const Header = memo(function Header({
266266
<header
267267
ref={ghostRef}
268268
className={cn(
269-
"w-full fixed top-0 left-0 right-0 z-50 transition-colors duration-300",
269+
"w-full sticky top-0 z-50 transition-colors duration-300",
270270
t.wrapper,
271271
className
272272
)}
273+
style={{ paddingTop: "env(safe-area-inset-top, 0px)" }}
273274
>
274275
<HeaderProvider value={{ theme }}>
275276
{renderNavRow()}

0 commit comments

Comments
 (0)