Skip to content

Commit

Permalink
fix(ui): adds high z-index to portal root (#579)
Browse files Browse the repository at this point in the history
* fix(ui): adds high z-index to portal root. Undo z changes for Label, PageHeader

* chore(ui): adds comment regarding z-index stacking

* Create tiny-cooks-try.md
  • Loading branch information
edda authored Nov 4, 2024
1 parent d4167c9 commit a304189
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tiny-cooks-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cloudoperators/juno-ui-components": patch
---

adds very high z-index (9999) to portal root container
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const labelstyles = `
jn-transition-all
jn-duration-100
jn-ease-in-out
jn-z-10
`

const floatingStyles = `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const pageHeaderStyles = `
jn-top-0
jn-px-6
jn-py-3
jn-z-[1]
jn-z-50
`

const pageHeaderInnerStyles = `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ interface PortalContextType {
}
export const PortalContext = createContext<PortalContextType | undefined>(undefined)

// ensure very high z-index on portal root element to help prevent z-stacking problems for portaled components
const portalRootStyles: React.CSSProperties = {
position: "absolute",
top: "0",
left: "0",
zIndex: "9999",
}

/** A hook that creates a portal container in the current portal root, and returns this newly created container as a node to use in other components:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const portalRootStyles = {
position: "absolute",
top: "0",
left: "0",
zIndex: "9999",
}

const portalStyles = {
Expand Down

0 comments on commit a304189

Please sign in to comment.