Skip to content

Instantly share code, notes, and snippets.

@popeating
Created November 3, 2023 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save popeating/6f318c398519b480b6424a1c6aff651d to your computer and use it in GitHub Desktop.
Save popeating/6f318c398519b480b6424a1c6aff651d to your computer and use it in GitHub Desktop.
'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