Skip to content

Commit

Permalink
Update CSS for scrollbar, chat body, chat footer, and chat header.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gab committed Feb 13, 2024
1 parent 6910e04 commit 7232556
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
10 changes: 10 additions & 0 deletions frontend/src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,14 @@
body.dark {
background-color: #222222; /* same as bg-gray-800 */
}

.custom-scrollbar::-webkit-scrollbar {
width: 6px; /* Ajustez la largeur de la scrollbar */
border-radius: 10px; /* Ajustez le rayon de bordure de la scrollbar */
}

.custom-scrollbar::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.3); /* Couleur de la scrollbar */
border-radius: 10px; /* Rayon de bordure de la scrollbar */
}
}
2 changes: 1 addition & 1 deletion frontend/src/components/Chat/ChatBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function ChatBody({ roomId }: { roomId: string }) {
}, [socket, roomId]);

return (
<div className="basis-[85%] overflow-y-scroll p-5 w-full flex flex-col gap-2">
<div className="basis-[85%] overflow-y-scroll p-5 w-full flex flex-col gap-2 custom-scrollbar">
{messages[roomId]?.map((message: any, index: number) =>
message.systemMessage ? (
<div className="flex self-center" key={index}>
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/components/Chat/ChatFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ function ChatFooter({ roomId }: { roomId: string }) {
<>
<AiFillPlusCircle
size={20}
className="cursor-pointer text-primary"
className="cursor-pointer text-red-600"
/>
<BsImage
size={20}
className="cursor-pointer text-primary"
className="cursor-pointer text-red-600"
onClick={() => fileRef.current.click()}
/>
<input
Expand All @@ -214,7 +214,7 @@ function ChatFooter({ roomId }: { roomId: string }) {
</div>
<BsEmojiSmileFill
size={20}
className="cursor-pointer absolute top-[6px] right-2 text-primary"
className="cursor-pointer absolute top-[6px] right-2 text-red-600"
onClick={() => setShowEmojiPicker(!showEmojiPicker)}
/>

Expand All @@ -235,8 +235,8 @@ function ChatFooter({ roomId }: { roomId: string }) {
{message.length === 0 && !image ? (
<AiFillLike
size={28}
className="cursor-pointer text-primary"
onClick={(e) => handleSendMessage(e, "👍")}
className="cursor-pointer text-red-600"
onClick={(e) => handleSendMessage(e, "👍 <Bon toutou>")}
/>
) : (
<IoMdSend
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Chat/ChatHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ function ChatHeader({ roomId }: { roomId: string }) {
}, [roomId]);

return (
<div className="basis-[7%] border-b-2 flex items-center justify-between p-3 font-medium">
<div className="basis-[7%] flex justify-center items-center p-3 font-medium bg-zinc-700">
<p className="text-xl dark:text-white">{room?.title}</p>
<button type="submit" className="btn">
<button type="submit" className="btn bg-red-600 hover:bg-red-800">
Copy Room ID
</button>
<Popup
Expand Down

0 comments on commit 7232556

Please sign in to comment.