Almost complete

This commit is contained in:
Ebube
2023-05-09 14:59:25 +01:00
parent 6dea851021
commit e49c7eb779
4 changed files with 106 additions and 57 deletions
+3 -4
View File
@@ -1,7 +1,6 @@
import React, { useState } from "react";
const CustomPopUp = ({ name, btn_class, title, children }) => {
const [isOpen, setIsOpen] = useState(false);
const CustomPopUp = ({ name, btn_class, title, children, isOpen, setIsOpen }) => {
const handleOpen = () => {
setIsOpen(true);
@@ -12,7 +11,7 @@ const CustomPopUp = ({ name, btn_class, title, children }) => {
};
return (
<>
<div>
<button onClick={handleOpen} className={btn_class}>
{name}
</button>
@@ -30,7 +29,7 @@ const CustomPopUp = ({ name, btn_class, title, children }) => {
</div>
</div>
)}
</>
</div>
);
};