Skip to content

Commit

Permalink
scrollable filebar
Browse files Browse the repository at this point in the history
  • Loading branch information
Kacperacy committed Apr 5, 2024
1 parent 8027619 commit bda63aa
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/TopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function TopBar() {
}

return (
<div className="flex flex-row bg-slate-700">
<div className="flex flex-row bg-slate-700 overflow-x-auto overflow-y-hidden scrollbar-thin">
{files.map((file) => (
<FileTab
key={file.filePath}
Expand Down
37 changes: 36 additions & 1 deletion src/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@tailwind utilities;

/* scrollbar.css */

@layer utilities {

/* Width of the horizontal scrollbar */
.scrollbar-thin::-webkit-scrollbar {
height: 5px;
}

/* Background color of the horizontal scrollbar track */
.scrollbar-thin::-webkit-scrollbar-track {
background: #f1f1f1;
}

/* Color of the horizontal scrollbar thumb */
.scrollbar-thin::-webkit-scrollbar-thumb {
background: #888;
}

/* Firefox horizontal scrollbar width */
.scrollbar-thin {
scrollbar-height: thin;
}

/* Firefox horizontal scrollbar track color */
.scrollbar-thin *::-moz-scrollbar-track {
background: #f1f1f1;
}

/* Firefox horizontal scrollbar thumb color */
.scrollbar-thin *::-moz-scrollbar-thumb {
background: #888;
}
}

0 comments on commit bda63aa

Please sign in to comment.