Created
November 3, 2023 13:09
-
-
Save popeating/6f318c398519b480b6424a1c6aff651d to your computer and use it in GitHub Desktop.
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
'use client'; | |
import React from 'react'; | |
function View({ vopen, setVopen, contact }) { | |
return ( | |
<> | |
<dialog id="add_modal" className="modal" open={vopen}> | |
<div className="modal-box w-2/3 max-w-3xl "> | |
<h3 className="font-bold text-lg">Contact Detail</h3> | |
<div className="text-xs mb-2">ID: {contact?._id}</div> | |
<div className="flex flex-col md:flex-row md:space-x-3 w-full "> | |
<div className="md:w-1/2">Name: {contact?.name}</div> | |
<div className="md:w-1/2">Email: {contact?.email}</div> | |
</div> | |
<div className="flex my-4 justify-end"> | |
<div | |
className="btn" | |
onClick={() => { | |
setVopen(false); | |
}} | |
> | |
Close | |
</div> | |
</div> | |
</div> | |
</dialog> | |
</> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment