mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-01-23 21:44:55 +03:00
feat: use role attribute instead of using class with no style
This commit is contained in:
parent
74075a014d
commit
c6facbe253
@ -40,7 +40,7 @@ export function Modal({
|
||||
};
|
||||
|
||||
const isTopMostModal = () => {
|
||||
const openModals = document.getElementsByClassName("modal-container");
|
||||
const openModals = document.querySelectorAll("[role=modal-container]");
|
||||
return (
|
||||
openModals.length &&
|
||||
openModals[openModals.length - 1].id === "modal-container-" + componentId
|
||||
@ -85,7 +85,8 @@ export function Modal({
|
||||
|
||||
return createPortal(
|
||||
<div
|
||||
className={styles.backdrop({ closing: isClosing }) + " modal-container"}
|
||||
className={styles.backdrop({ closing: isClosing })}
|
||||
role="modal-container"
|
||||
id={"modal-container-" + componentId}
|
||||
>
|
||||
<div
|
||||
|
Loading…
Reference in New Issue
Block a user