Skip to content

Commit

Permalink
feat(plugin-basic-ui): add interface to access z-index about AppScreen (
Browse files Browse the repository at this point in the history
#514)

Co-authored-by: JH.Lee <[email protected]>
  • Loading branch information
malangcat and orionmiz committed Sep 11, 2024
1 parent 354a0df commit 5b1865e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/chilled-items-protect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@stackflow/plugin-basic-ui": minor
---

feat(plugin-basic-ui): add interface to access z-index about AppScreen
14 changes: 13 additions & 1 deletion extensions/plugin-basic-ui/src/components/AppScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ export const OFFSET_PX_CUPERTINO = 80;

export type AppScreenContext = {
scroll: (args: { top: number }) => void;
zIndices: {
dim: number;
paper: number;
edge: number;
appBar: number;
};
};
const Context = createContext<AppScreenContext>(null as any);

Expand Down Expand Up @@ -193,8 +199,14 @@ const AppScreen: React.FC<AppScreenProps> = ({
behavior: "smooth",
});
},
zIndices: {
dim: zIndexDim,
paper: zIndexPaper,
edge: zIndexEdge,
appBar: zIndexAppBar,
},
}),
[paperRef],
[paperRef, zIndexDim, zIndexPaper, zIndexEdge, zIndexAppBar],
)}
>
<div
Expand Down

0 comments on commit 5b1865e

Please sign in to comment.