Skip to content

Commit

Permalink
Add tailwind-scrollbar package and update ChatBody component
Browse files Browse the repository at this point in the history
  • Loading branch information
etienne committed Feb 17, 2024
1 parent 71e98b5 commit 1df9e84
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
19 changes: 19 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"@types/uuid": "^9.0.1",
"bufferutil": "^4.0.7",
"supports-color": "^8.1.1",
"tailwind-scrollbar": "^3.1.0",
"utf-8-validate": "^5.0.10"
}
}
5 changes: 3 additions & 2 deletions frontend/src/components/Chat/ChatBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,12 @@ function ChatBody({ roomId }: { roomId: string }) {
style={{
flexGrow: 1,
overflowY: "auto",
overflowX: "auto",
overflowX: "hidden",
height: "calc(100vh - 60px)",
}}
className="scrollbar-thin scrollbar-thumb-gray-500 scrollbar-track-transparent"
>
<div className="basis_[85%] overflow-y-scroll p-5 w-full flex flex-col gap-2 custom-scrollbar rounded-lg">
<div className="basis_[85%] p-5 w-full flex flex-col gap-2 rounded-lg">
{messages[roomId]?.map((message: any, index: number) => (
<Message
message={message}
Expand Down
2 changes: 1 addition & 1 deletion frontend/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ module.exports = {
},
},
},
plugins: [],
plugins: [require("tailwind-scrollbar")],
};

0 comments on commit 1df9e84

Please sign in to comment.