mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-15 04:32:13 +00:00
feat: use role attribute instead of using class with no style
This commit is contained in:
parent
e79e06adb7
commit
673691f329
1 changed files with 3 additions and 2 deletions
|
@ -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 a new issue