Commit fedd0d8
feat(modal): accept an optional overlayZIndex prop for nested-modal stacking
The shared Modal component's overlay defaults to z-index 3000. When
one Modal is opened from inside another whose overlay has bumped its
z-index — a pattern used by some consumers to ensure their modal
stays above its parent — opening a default-z-index Modal from inside
that one renders the nested Modal *behind* the parent overlay. The
screen darkens (both overlays compound) but the new Modal's content
is invisible and uninteractive.
Add an optional `overlayZIndex: Number` prop that, when supplied, is
applied as an inline style on the overlay div. The default is left
undefined so the global `.modal-overlay { z-index: 3000 }` rule still
wins for every existing caller — strictly additive, no behaviour
change for anyone who doesn't opt in.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent e1686a6 commit fedd0d8
2 files changed
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| |||
70 | 75 | | |
71 | 76 | | |
72 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
73 | 84 | | |
74 | 85 | | |
75 | 86 | | |
| |||
81 | 92 | | |
82 | 93 | | |
83 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
84 | 99 | | |
85 | 100 | | |
86 | 101 | | |
| |||
0 commit comments