handling internal ID

This commit is contained in:
Antoine M 2024-05-14 10:44:14 +02:00
parent 1493cd5914
commit b1e76ad488

View File

@ -1,7 +1,7 @@
import React from "react";
import { useEffect, useRef } from "react";
export default function Modal({ open, onClose, children, className, closeModal }) {
export default function Modal({ open, onClose, children, className, id, closeModal }) {
const modalRef = useRef(null);
useEffect(() => {
@ -16,7 +16,7 @@ export default function Modal({ open, onClose, children, className, closeModal }
}, [open]);
return (
<dialog className={className} ref={modalRef} onClose={onClose}>
<dialog id={id} className={className} ref={modalRef} onClose={onClose}>
{children}
</dialog>
);