1+ import { Popover , PopoverButton , PopoverPanel } from "@headlessui/react" ;
2+ import { EllipsisVerticalIcon , MagnifyingGlassIcon , MicrophoneIcon , PhotoIcon , PlusIcon , VideoCameraIcon } from "@heroicons/react/24/solid" ;
3+ import Image from "next/image" ;
4+
15export default function Page ( ) {
26 return (
3- < section >
7+ < div className = "flex-1 flex flex-col overflow-hidden relative" >
8+ < header className = "flex items-center p-4 gap-4 bg-[#F0F2F5] shadow" >
9+ < button className = "cursor-pointer" >
10+ < Image
11+ src = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS1MWm4Uc-yhWB5bkRg8r_Vy6ueABFtDb_qSA& s "
12+ alt = "Donald Trump"
13+ width = { 40 }
14+ height = { 40 }
15+ className = " rounded-full aspect-square object-cover" />
16+ </ button >
17+ < h1 className = "flex-1" > Donald Trump</ h1 >
18+ < div className = "flex items-center gap-8" >
19+ < button className = "p-2 rounded-full cursor-pointer active:bg-slate-300/60
20+ transition-all duration-150 ease-in-out" >
21+ < VideoCameraIcon className = "size-6 text-slate-400" />
22+ </ button >
23+ < button className = "p-2 rounded-full cursor-pointer active:bg-slate-300/60
24+ transition-all duration-150 ease-in-out" >
25+ < MagnifyingGlassIcon className = "size-6 text-slate-800" />
26+ </ button >
27+ < Popover className = "relative" >
28+ < PopoverButton className = "p-2 rounded-full cursor-pointer active:bg-slate-300/60
29+ transition-all duration-150 ease-in-out ring-0 outline-0 focus:bg-slate-300/60" >
30+ < EllipsisVerticalIcon className = "size-6 text-slate-800" />
31+ </ PopoverButton >
32+ < PopoverPanel as = "ul" anchor = "bottom start" className = "bg-white py-4 shadow rounded-sm
33+ w-52 flex flex-col gap-2 mr-2 " >
34+ < li className = "hover:bg-gray-100 px-4 py-2 cursor-pointer" > Contact Info</ li >
35+ < li className = "hover:bg-gray-100 px-4 py-2 cursor-pointer" > Select messages</ li >
36+ < li className = "hover:bg-gray-100 px-4 py-2 cursor-pointer" > Mute notifications</ li >
37+ < li className = "hover:bg-gray-100 px-4 py-2 cursor-pointer" > Disappearing messages</ li >
38+ < li className = "hover:bg-gray-100 px-4 py-2 cursor-pointer" > Close chat</ li >
39+ < li className = "hover:bg-gray-100 px-4 py-2 cursor-pointer" > Report</ li >
40+ < li className = "hover:bg-gray-100 px-4 py-2 cursor-pointer" > Block</ li >
41+ < li className = "hover:bg-gray-100 px-4 py-2 cursor-pointer" > Clear chat</ li >
42+ < li className = "hover:bg-gray-100 px-4 py-2 cursor-pointer" > Delete chat</ li >
43+ </ PopoverPanel >
44+ </ Popover >
45+ </ div >
46+ </ header >
47+ < div className = "flex-1 overflow-y-scroll bg-[#EFEAE2] relative flex" >
48+ < div className = "w-full h-full absolute bg-[url(./wa-bg.png)]" > </ div >
49+ < div className = "flex flex-col z-50 py-5 px-10 w-full gap-4" >
50+ < div className = "relative rounded-lg bg-[#DCF8C6] px-3 py-2 shadow-xs
51+ self-end max-w-[65%]" >
52+ < p className = "text-[15px] text-gray-700" >
53+ Halo Admin Joy Dental, saya mau konsultasi gigi
54+ </ p >
55+ < div className = "flex items-center justify-end gap-1 text-[11px] text-gray-500" >
56+ < span > 8:16 AM</ span >
57+ < span className = "ml-1" > ✓✓</ span >
58+ </ div >
59+ { /* Triangle shape for chat bubble */ }
60+ < div
61+ className = "absolute top-0 -right-2.5 h-4 w-4"
62+ style = { {
63+ clipPath : "polygon(0 0, 100% 0, 0 100%, 0 50%)" ,
64+ } }
65+ >
66+ < div className = "absolute h-5 w-5 transform bg-[#DCF8C6]" />
67+ </ div >
68+ </ div >
469
5- </ section >
70+ < div className = "relative rounded-lg bg-white px-3 py-2 shadow-xs
71+ self-start max-w-[65%]" >
72+ < p className = "text-[15px] text-gray-700" >
73+ Terima kasih telah menghubungi Hotline Klinik Gigi Joy Dental. Mohon maaf saat ini di luar jam operasional kami. Kami akan segera menghubungi kembali di jam operasional:
74+ </ p >
75+ < div className = "flex items-center justify-end gap-1 text-[11px] text-gray-500" >
76+ < span > 8:16 AM</ span >
77+ < span className = "ml-1" > ✓✓</ span >
78+ </ div >
79+ { /* Triangle shape for chat bubble */ }
80+ < div
81+ className = "absolute top-0 -left-2.5 h-4 w-4"
82+ style = { {
83+ clipPath : "polygon(0 0, 0 0, 100% 0, 100% 100%)" ,
84+ } }
85+ >
86+ < div className = "absolute h-5 w-5 transform bg-white" />
87+ </ div >
88+ </ div >
89+ </ div >
90+ </ div >
91+ < div className = "flex items-center p-4 gap-4 bg-[#F0F2F5]
92+ shadow-[0_-1px_3px_0_rgba(0,0,0,0.1),0_-1px_2px_0_rgba(0,0,0,0.06)]" >
93+ < button >
94+ < PlusIcon className = "size-6 text-gray-700" />
95+ </ button >
96+ < div className = "flex-1 flex items-center gap-3 bg-white p-3
97+ rounded-lg" >
98+ < button >
99+ < PhotoIcon className = "size-6 text-gray-700" />
100+ </ button >
101+ < input placeholder = "Type a message" className = "outline-none flex-1" />
102+ </ div >
103+ < button >
104+ < MicrophoneIcon className = "size-6 text-gray-700" />
105+ </ button >
106+ </ div >
107+ </ div >
6108 )
7109}
0 commit comments