|
| 1 | +// src/components/popups/user_groups_add_popup.tsx |
| 2 | + |
| 3 | +import Link from "next/link"; |
| 4 | +import React from "react"; |
| 5 | + |
| 6 | +// type MyFriends = { |
| 7 | +// id: number; |
| 8 | +// name: string; |
| 9 | +// } |
| 10 | + |
| 11 | +type ItemModalProps = { |
| 12 | + isOpen: boolean; |
| 13 | + onClose: () => void; |
| 14 | +}; |
| 15 | + |
| 16 | +function UserFriendsAddPopup({ isOpen, onClose }: ItemModalProps) { |
| 17 | + if (!isOpen) return null; |
| 18 | + return ( |
| 19 | + <div |
| 20 | + className="fixed inset-0 z-50 flex items-center justify-center bg-black/40" |
| 21 | + onClick={onClose} |
| 22 | + > |
| 23 | + <div className="w-full max-w-md rounded-xl bg-white p-6 shadow-lg"> |
| 24 | + {/* Header */} |
| 25 | + <div className="flex items-center justify-between border-b pb-3"> |
| 26 | + <h2 className="text-lg font-semibold">Add Friends</h2> |
| 27 | + <button |
| 28 | + onClick={onClose} |
| 29 | + className="text-gray-500 hover:text-gray-800" |
| 30 | + > |
| 31 | + ✕ |
| 32 | + </button> |
| 33 | + </div> |
| 34 | + |
| 35 | + {/* Body */} |
| 36 | + <div className="space-y-2 py-4"> |
| 37 | + {/* Start */} |
| 38 | + <div className="w-full min-w-[200px] max-w-sm"> |
| 39 | + <div className="relative"> |
| 40 | + <input |
| 41 | + className="ease w-full rounded-md border border-slate-200 bg-transparent py-2 pl-3 pr-28 text-sm text-slate-700 shadow-sm transition duration-300 placeholder:text-slate-400 hover:border-slate-300 focus:border-slate-400 focus:shadow focus:outline-none" |
| 42 | + placeholder="Eg., Ky Kiske" |
| 43 | + /> |
| 44 | + <button |
| 45 | + className="absolute right-1 top-1 flex items-center rounded border border-transparent bg-slate-800 px-2.5 py-1 text-center text-sm text-white shadow-sm transition-all hover:bg-slate-700 hover:shadow focus:bg-slate-700 focus:shadow-none active:bg-slate-700 active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none" |
| 46 | + type="button" |
| 47 | + > |
| 48 | + <svg |
| 49 | + xmlns="http://www.w3.org/2000/svg" |
| 50 | + viewBox="0 0 24 24" |
| 51 | + fill="currentColor" |
| 52 | + className="mr-2 h-4 w-4" |
| 53 | + > |
| 54 | + <path |
| 55 | + fill-rule="evenodd" |
| 56 | + d="M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z" |
| 57 | + clip-rule="evenodd" |
| 58 | + /> |
| 59 | + </svg> |
| 60 | + Search |
| 61 | + </button> |
| 62 | + </div> |
| 63 | + </div> |
| 64 | + {/* End */} |
| 65 | + {/* <p><strong>ID:</strong> Ummm ~~ </p> */} |
| 66 | + </div> |
| 67 | + |
| 68 | + {/* Footer */} |
| 69 | + <div className="flex justify-end gap-3 border-t pt-4"> |
| 70 | + <Link href="../../../pages/user_add_friend"> |
| 71 | + <button className="rounded bg-gray-200 px-4 py-2 hover:bg-gray-300"> |
| 72 | + Expand |
| 73 | + </button> |
| 74 | + </Link> |
| 75 | + |
| 76 | + {/* <button |
| 77 | + onClick={onClose} |
| 78 | + className="px-4 py-2 rounded bg-gray-200 hover:bg-gray-300" |
| 79 | + >Expand |
| 80 | + </button> */} |
| 81 | + <button |
| 82 | + onClick={onClose} |
| 83 | + className="rounded bg-gray-200 px-4 py-2 hover:bg-gray-300" |
| 84 | + > |
| 85 | + Close |
| 86 | + </button> |
| 87 | + <button className="rounded bg-blue-600 px-4 py-2 text-white hover:bg-blue-700"> |
| 88 | + Edit |
| 89 | + </button> |
| 90 | + </div> |
| 91 | + </div> |
| 92 | + </div> |
| 93 | + ); |
| 94 | +} |
| 95 | +export default UserFriendsAddPopup; |
0 commit comments