Skip to content

Commit 837a618

Browse files
authored
Merge pull request #54 from govtechmy/feature/SSD-872-tab-mobile-view
Feature/SSD-872-tab-mobile-view
2 parents 0295d65 + b4d5532 commit 837a618

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

dashboards/home/layout.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,17 @@ const HomeLayout = ({ children }: HomeLayoutProps) => {
4747
/>
4848

4949
<nav className="sticky top-14 z-20 flex justify-start overflow-hidden border-b border-b-border bg-background min-[350px]:justify-center lg:static">
50-
<div className="hide-scrollbar flex snap-x snap-mandatory scroll-px-9 flex-nowrap overflow-x-auto">
50+
<div
51+
className="flex snap-x snap-mandatory scroll-px-9 flex-nowrap overflow-x-auto
52+
[&::-webkit-scrollbar-thumb]:rounded-full
53+
[&::-webkit-scrollbar-thumb]:bg-gray-400/40
54+
[&::-webkit-scrollbar-track]:bg-transparent
55+
[&::-webkit-scrollbar]:h-1"
56+
>
5157
{TAB_OPTIONS.map(tab => {
5258
const isPath = tab.href.includes(pathname);
5359
return (
54-
<div key={tab.name} className="snap-start">
60+
<div key={tab.name} className="shrink-0 snap-start">
5561
<At
5662
href={tab.href[0]}
5763
scrollTop={false}
@@ -60,7 +66,7 @@ const HomeLayout = ({ children }: HomeLayoutProps) => {
6066
<div
6167
className={cn(
6268
isPath && "bg-bg-black-50 dark:bg-bg-black-200",
63-
"relative flex h-full flex-col items-center justify-center p-4"
69+
"relative flex h-full flex-col items-center justify-center p-4.5"
6470
)}
6571
>
6672
<div
@@ -77,7 +83,7 @@ const HomeLayout = ({ children }: HomeLayoutProps) => {
7783
</div>
7884
</div>
7985
{isPath && (
80-
<div className="absolute bottom-0 inline-flex h-[2px] w-full min-w-[56px] rounded-full bg-secondary" />
86+
<div className="absolute top-0 inline-flex h-[2px] w-full min-w-[56px] rounded-full bg-secondary" />
8187
)}
8288
</div>
8389
</At>

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)