Álvaro Valenzuela Valdes commited on
Commit
43e744c
·
1 Parent(s): cc0d2b2

fix: Eliminated horizontal scroll and styled vertical scrollbar for sidebar

Browse files
frontend/components/Sidebar.tsx CHANGED
@@ -54,7 +54,7 @@ export default function Sidebar({ tabs, activeTab, onTabSelect, status, lang }:
54
  {isExpanded && <h1 className="text-xl font-bold tracking-tight text-white whitespace-nowrap animate-in fade-in duration-500">AndesOps</h1>}
55
  </div>
56
 
57
- <nav className="flex-1 flex flex-col gap-2 overflow-y-auto custom-scrollbar pr-1">
58
  {tabs.map((tab) => {
59
  const isActive = activeTab === tab;
60
  const { label, icon } = getTabLabel(tab);
 
54
  {isExpanded && <h1 className="text-xl font-bold tracking-tight text-white whitespace-nowrap animate-in fade-in duration-500">AndesOps</h1>}
55
  </div>
56
 
57
+ <nav className="flex-1 flex flex-col gap-2 overflow-y-auto overflow-x-hidden custom-scrollbar pr-1">
58
  {tabs.map((tab) => {
59
  const isActive = activeTab === tab;
60
  const { label, icon } = getTabLabel(tab);
frontend/globals.css CHANGED
@@ -64,14 +64,29 @@
64
  }
65
 
66
  /* Custom scrollbar */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  ::-webkit-scrollbar {
68
- width: 8px;
69
  }
70
  ::-webkit-scrollbar-track {
71
  @apply bg-transparent;
72
  }
73
  ::-webkit-scrollbar-thumb {
74
- @apply bg-white/10 rounded-full hover:bg-white/20 transition-colors;
75
  }
76
 
77
  ::selection {
 
64
  }
65
 
66
  /* Custom scrollbar */
67
+ .custom-scrollbar::-webkit-scrollbar {
68
+ width: 4px;
69
+ height: 0px;
70
+ }
71
+ .custom-scrollbar::-webkit-scrollbar-track {
72
+ background: transparent;
73
+ }
74
+ .custom-scrollbar::-webkit-scrollbar-thumb {
75
+ background: rgba(168, 85, 247, 0.2);
76
+ border-radius: 10px;
77
+ }
78
+ .custom-scrollbar::-webkit-scrollbar-thumb:hover {
79
+ background: rgba(168, 85, 247, 0.4);
80
+ }
81
+
82
  ::-webkit-scrollbar {
83
+ width: 6px;
84
  }
85
  ::-webkit-scrollbar-track {
86
  @apply bg-transparent;
87
  }
88
  ::-webkit-scrollbar-thumb {
89
+ @apply bg-white/5 rounded-full hover:bg-white/10 transition-colors;
90
  }
91
 
92
  ::selection {