Added buttons
This commit is contained in:
@@ -1,49 +1,7 @@
|
||||
import Modal from "@/components/modal/Modal";
|
||||
import ModalBody from "@/components/modal/ModalBody";
|
||||
import ModalFooter from "@/components/modal/ModalFooter";
|
||||
import ModalHeader from "@/components/modal/ModalHeader";
|
||||
import { useState } from "react";
|
||||
|
||||
|
||||
export default function HomePage(){
|
||||
const [ displayModal, setDisplayModal ] = useState(false);
|
||||
|
||||
|
||||
const showModal = () => {
|
||||
setDisplayModal(true);
|
||||
}
|
||||
|
||||
const hideModal = () => {
|
||||
setDisplayModal(false);
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<main>
|
||||
<div>Home Page</div>
|
||||
<button
|
||||
onClick={showModal}
|
||||
>
|
||||
Modal
|
||||
</button>
|
||||
<Modal
|
||||
display={displayModal}
|
||||
close={hideModal}
|
||||
backgroundType="lighten"
|
||||
className="bg-(--bg-color) text-(--text-color)"
|
||||
>
|
||||
<ModalHeader
|
||||
close={hideModal}
|
||||
>
|
||||
Header
|
||||
</ModalHeader>
|
||||
<ModalBody>
|
||||
Body
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
Footer
|
||||
</ModalFooter>
|
||||
</Modal>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user