refactor: replace zIndex with display for page stacking
This commit is contained in:
@@ -114,7 +114,9 @@ export function PageManager({
|
|||||||
<div
|
<div
|
||||||
key={item.index}
|
key={item.index}
|
||||||
className="absolute top-0 left-0 w-full h-full bg-background"
|
className="absolute top-0 left-0 w-full h-full bg-background"
|
||||||
style={{ zIndex: index + 1 }}
|
style={{
|
||||||
|
display: index === secondaryStack.length - 1 ? 'block' : 'none'
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{item.component}
|
{item.component}
|
||||||
</div>
|
</div>
|
||||||
@@ -122,7 +124,7 @@ export function PageManager({
|
|||||||
<div
|
<div
|
||||||
key={primaryPageKey}
|
key={primaryPageKey}
|
||||||
className="absolute top-0 left-0 w-full h-full bg-background"
|
className="absolute top-0 left-0 w-full h-full bg-background"
|
||||||
style={{ zIndex: 0 }}
|
style={{ display: !secondaryStack.length ? 'block' : 'none' }}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
@@ -150,7 +152,10 @@ export function PageManager({
|
|||||||
<div
|
<div
|
||||||
key={item.index}
|
key={item.index}
|
||||||
className="absolute top-0 left-0 w-full h-full bg-background"
|
className="absolute top-0 left-0 w-full h-full bg-background"
|
||||||
style={{ zIndex: index + 1 }}
|
style={{
|
||||||
|
zIndex: index + 1,
|
||||||
|
display: index === secondaryStack.length - 1 ? 'block' : 'none'
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{item.component}
|
{item.component}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user