feat: rename role

This commit is contained in:
Fernando Zanutto 2024-04-23 19:15:26 -03:00
parent 8ebb384418
commit 0cf9362f18

View File

@ -41,7 +41,7 @@ export function Modal({
}; };
const isTopMostModal = () => { const isTopMostModal = () => {
const openModals = document.querySelectorAll("[role=modal-content]"); const openModals = document.querySelectorAll("[role=modal]");
return ( return (
openModals.length && openModals.length &&
openModals[openModals.length - 1] === modalContentRef.current openModals[openModals.length - 1] === modalContentRef.current
@ -86,7 +86,7 @@ export function Modal({
<div className={styles.backdrop({ closing: isClosing })}> <div className={styles.backdrop({ closing: isClosing })}>
<div <div
className={styles.modal({ closing: isClosing })} className={styles.modal({ closing: isClosing })}
role="modal-content" role="modal"
ref={modalContentRef} ref={modalContentRef}
> >
<div className={styles.modalHeader}> <div className={styles.modalHeader}>