Almost complete
This commit is contained in:
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user