Adding in modal for card detail when card is clicked. Working through styling, and working with NextJS.
This commit is contained in:
14
components/modal.tsx
Normal file
14
components/modal.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { createPortal } from "react-dom";
|
||||
|
||||
import ClientOnlyPortal from "./ClientOnlyPortal";
|
||||
|
||||
export default function Modal({open}: { open: Function }) {
|
||||
return (
|
||||
<ClientOnlyPortal selector="#modal-root">
|
||||
<div className='fixed bottom-0 container left-0 rounded-md modal'>
|
||||
Hello
|
||||
<button onClick={() => open(false)}>Close</button>
|
||||
</div>
|
||||
</ClientOnlyPortal>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user