Skip to content

Commit b4d5532

Browse files
committed
Fix layout: enhance scrollbar styles and adjust tab item spacing in Hansard catalogue
1 parent 4ea87ff commit b4d5532

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

data-catalogue/layout.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,17 @@ const CatalogIndexLayout = ({ children }: { children: ReactNode }) => {
4545
/>
4646

4747
<nav className="sticky top-14 z-20 flex h-14 justify-start overflow-hidden border-b border-b-border bg-background min-[350px]:justify-center">
48-
<div className="hide-scrollbar flex snap-x snap-mandatory scroll-px-9 flex-nowrap overflow-x-auto max-sm:justify-start">
48+
<div
49+
className="flex snap-x snap-mandatory scroll-px-9 flex-nowrap overflow-x-auto max-sm:justify-start
50+
[&::-webkit-scrollbar-thumb]:rounded-full
51+
[&::-webkit-scrollbar-thumb]:bg-gray-400/45
52+
[&::-webkit-scrollbar-track]:bg-transparent
53+
[&::-webkit-scrollbar]:h-1"
54+
>
4955
{TAB_OPTIONS.map(tab => {
5056
const isPath = pathname.includes(tab.path);
5157
return (
52-
<div key={tab.path} className="snap-start">
58+
<div key={tab.path} className="shrink-0 snap-start">
5359
<At
5460
href={tab.path}
5561
scrollTop={false}
@@ -58,7 +64,7 @@ const CatalogIndexLayout = ({ children }: { children: ReactNode }) => {
5864
<div
5965
className={cn(
6066
isPath && "bg-bg-black-50 dark:bg-bg-black-200",
61-
"relative flex h-full flex-col items-center justify-center p-4"
67+
"relative flex h-full flex-col items-center justify-center p-4.5"
6268
)}
6369
>
6470
<div className="flex items-center gap-2">
@@ -80,7 +86,7 @@ const CatalogIndexLayout = ({ children }: { children: ReactNode }) => {
8086
</div>
8187
</div>
8288
{isPath && (
83-
<div className="absolute bottom-0 inline-flex h-[2px] w-full min-w-[56px] rounded-full bg-secondary" />
89+
<div className="absolute top-0 inline-flex h-[2px] w-full min-w-[56px] rounded-full bg-secondary" />
8490
)}
8591
</div>
8692
</At>

0 commit comments

Comments
 (0)