forked from TKOaly/exam-archive-new
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create baseline for modals for creating courses, uploading exams and …
…admin tooling like managing courses and exams. Closing button of modal is commented out and click outside to close is not implemented yet because of vercel/next.js#52681
- Loading branch information
1 parent
73dce7e
commit 433fb88
Showing
4 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const Default = () => { | ||
return null | ||
} | ||
|
||
export default Default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const Default = () => { | ||
return null | ||
} | ||
|
||
export default Default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// "use client" | ||
import React from 'react' | ||
|
||
// import { useRouter } from 'next/navigation' | ||
import { XCircleIcon } from '@heroicons/react/24/outline' | ||
|
||
const Modal = ({ | ||
children, | ||
title | ||
}: { | ||
children: React.ReactNode | ||
title: string | ||
}) => { | ||
// const router = useRouter() | ||
|
||
return ( | ||
<div className="fixed bottom-0 left-0 right-0 top-0 h-screen w-screen overflow-y-auto overflow-x-hidden bg-black/40"> | ||
<div className="pointer-events-none relative mx-auto mt-36 w-full"> | ||
<div className="pointer-events-auto flex w-full flex-col bg-white bg-clip-padding"> | ||
<div className="flex flex-shrink-0 items-center justify-between px-20 py-5"> | ||
<h3 className="font-serif text-4xl font-extrabold text-gray-800"> | ||
{title} | ||
</h3> | ||
{/* <button onClick={() => router.back()}> */} | ||
<XCircleIcon className="h-8 w-8 flex-shrink-0" /> | ||
{/* <p className="sr-only">Close</p> */} | ||
{/* </button> */} | ||
</div> | ||
<div className="px-20 py-5">{children}</div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default Modal |