()
| 6 | import { useStateContext } from '../contexts/ContextProvider'; |
| 7 | |
| 8 | const Chat = () => { |
| 9 | const { currentColor } = useStateContext(); |
| 10 | |
| 11 | return ( |
| 12 | <div className="nav-item absolute right-5 md:right-52 top-16 bg-white dark:bg-[#42464D] p-8 rounded-lg w-96"> |
| 13 | <div className="flex justify-between items-center"> |
| 14 | <div className="flex gap-3"> |
| 15 | <p className="font-semibold text-lg dark:text-gray-200">Messages</p> |
| 16 | <button type="button" className="text-white text-xs rounded p-1 px-2 bg-orange"> |
| 17 | 5 New |
| 18 | </button> |
| 19 | </div> |
| 20 | <Button |
| 21 | icon={<MdOutlineCancel />} |
| 22 | color="rgb(153, 171, 180)" |
| 23 | bgHoverColor="light-gray" |
| 24 | size="2xl" |
| 25 | borderRadius="50%" |
| 26 | /> |
| 27 | </div> |
| 28 | <div className="mt-5 "> |
| 29 | {chatData?.map((item, index) => ( |
| 30 | <div key={index} className="flex items-center gap-5 border-b-1 border-color p-3 leading-8 cursor-pointer"> |
| 31 | <div className="relative"> |
| 32 | <img |
| 33 | className="rounded-full h-10 w-10" |
| 34 | src={item.image} |
| 35 | alt={item.message} |
| 36 | /> |
| 37 | <span |
| 38 | style={{ background: item.dotColor }} |
| 39 | className="absolute inline-flex rounded-full h-2 w-2 right-0 -top-1" |
| 40 | /> |
| 41 | </div> |
| 42 | <div> |
| 43 | <p className="font-semibold dark:text-gray-200 ">{item.message}</p> |
| 44 | <p className="text-gray-500 dark:text-gray-400 text-sm">{item.desc}</p> |
| 45 | <p className="text-gray-500 dark:text-gray-400 text-xs">{item.time}</p> |
| 46 | </div> |
| 47 | </div> |
| 48 | ))} |
| 49 | <div className="mt-5"> |
| 50 | <Button |
| 51 | color="white" |
| 52 | bgColor={currentColor} |
| 53 | text="See all messages" |
| 54 | borderRadius="10px" |
| 55 | width="full" |
| 56 | /> |
| 57 | </div> |
| 58 | </div> |
| 59 | </div> |
| 60 | ); |
| 61 | }; |
| 62 | |
| 63 | export default Chat; |
nothing calls this directly
no test coverage detected