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
9fa88255a8
commit
801abbf744
@ -40,7 +40,7 @@ export function Modal({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const isTopMostModal = () => {
|
const isTopMostModal = () => {
|
||||||
const openModals = document.getElementsByClassName("modal-container");
|
const openModals = document.querySelectorAll("[role=modal-container]");
|
||||||
return (
|
return (
|
||||||
openModals.length &&
|
openModals.length &&
|
||||||
openModals[openModals.length - 1].id === "modal-container-" + componentId
|
openModals[openModals.length - 1].id === "modal-container-" + componentId
|
||||||
@ -85,7 +85,8 @@ export function Modal({
|
|||||||
|
|
||||||
return createPortal(
|
return createPortal(
|
||||||
<div
|
<div
|
||||||
className={styles.backdrop({ closing: isClosing }) + " modal-container"}
|
className={styles.backdrop({ closing: isClosing })}
|
||||||
|
role="modal-container"
|
||||||
id={"modal-container-" + componentId}
|
id={"modal-container-" + componentId}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
Loading…
Reference in New Issue
Block a user