Skip to content

Commit

Permalink
fix: increase z-index of modal (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
markdalgleish committed Mar 29, 2022
1 parent 24ff68f commit 8d0025a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/mean-steaks-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rainbow-me/rainbowkit': patch
---

Increase z-index of modal to `2147483646` (Coinbase modal z-index minus 1) to ensure RainbowKit renders on top of other elements.
6 changes: 6 additions & 0 deletions packages/rainbowkit/src/components/Dialog/Dialog.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ const fadeIn = keyframes({
'100%': { opacity: 1 },
});

const nestedModalZIndexes: Record<string, number> = {
coinbase: 2147483647,
walletConnect: 99999999999999,
};

const bleed = 200;
export const overlay = style([
sprinkles({
Expand All @@ -31,6 +36,7 @@ export const overlay = style([
right: -bleed,
top: -bleed,
transform: 'translateZ(0)', // This is required for content to render under the URL bar on iOS
zIndex: Math.min(...Object.values(nestedModalZIndexes)) - 1,
},
]);

Expand Down

2 comments on commit 8d0025a

@vercel
Copy link

@vercel vercel bot commented on 8d0025a Mar 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

rainbowkit-site – ./

rainbowkit-site-rainbowdotme.vercel.app
rainbowkit-site-git-main-rainbowdotme.vercel.app
rainbowkit.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 8d0025a Mar 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.