mirror of
https://github.com/MrPatben8/konduktor.git
synced 2026-11-27 10:22:51 +01:00
Fixed overlay windows rendering below other UI
This commit is contained in:
1 parent
2810f24563
commit
be80e572e5
16 files changed
+104
-65
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { createPortal } from 'react-dom'
|
||||
import { useEffect, useState, type ReactNode } from 'react'
|
||||
|
||||
export interface ConfirmRequest {
|
||||
@@ -43,10 +44,10 @@ export function ConfirmDialog({ title, body, confirmLabel, onConfirm, onClose }:
|
||||
return () => window.removeEventListener('keydown', onKey)
|
||||
})
|
||||
|
||||
return (
|
||||
return createPortal(
|
||||
<div
|
||||
aria-modal="true"
|
||||
className="fixed inset-0 z-40 flex items-center justify-center bg-black/40 backdrop-blur-[3px] p-6"
|
||||
className="fixed inset-0 z-50 flex items-center justify-center bg-black/40 backdrop-blur-[3px] p-6"
|
||||
onClick={() => !busy && onClose()}
|
||||
>
|
||||
<div
|
||||
@@ -74,6 +75,7 @@ export function ConfirmDialog({ title, body, confirmLabel, onConfirm, onClose }:
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>,
|
||||
document.body,
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user