@@ -4,6 +4,7 @@ import { motion } from 'motion/react';
44import Link from 'next/link' ;
55
66import type { CraftStation } from '@/app/craft/types' ;
7+ import { ScrollArea , ScrollBar } from '@/components/ui/scroll-area' ;
78import { cn } from '@/lib/utils' ;
89
910type CraftStationLinkProps = {
@@ -16,27 +17,34 @@ export function CraftStationLink(props: CraftStationLinkProps) {
1617 < motion . div
1718 layoutId = { `craft_station.container.${ props . station . id } ` }
1819 className = { cn (
19- 'group bg-background flex h-20 w-full flex-col justify-center overflow-hidden rounded-lg border p -4 text-left' ,
20+ 'group bg-background flex h-20 w-full flex-col justify-center overflow-hidden rounded-lg border py -4 text-left' ,
2021 'transition-shadow duration-300 hover:shadow-md'
2122 ) }
2223 >
2324 < motion . div
2425 layoutId = { `craft_station.title.${ props . station . id } ` }
25- className = 'shrink-0 truncate text-sm font-semibold'
26+ className = 'shrink-0 truncate px-4 text-sm font-semibold'
2627 >
2728 { props . station . title }
2829 </ motion . div >
29- < div className = 'text-muted-foreground mt-2 flex shrink-0 items-center gap-x-2 text-xs' >
30- { props . station . tags . map ( ( tag ) => (
31- < motion . span
32- layoutId = { `craft_station.tag.${ props . station . id } .${ tag } ` }
33- className = 'bg-muted rounded-md border px-2.5 py-1'
34- key = { tag }
35- >
36- { tag }
37- </ motion . span >
38- ) ) }
39- </ div >
30+ < ScrollArea className = 'relative w-full' >
31+ < div className = 'text-muted-foreground mt-2 flex shrink-0 items-center gap-x-2 px-4 text-xs' >
32+ { props . station . tags . map ( ( tag ) => (
33+ < motion . span
34+ layoutId = { `craft_station.tag.${ props . station . id } .${ tag } ` }
35+ className = 'bg-muted rounded-md border px-2.5 py-1'
36+ key = { tag }
37+ >
38+ { tag }
39+ </ motion . span >
40+ ) ) }
41+ </ div >
42+ < ScrollBar orientation = 'horizontal' className = 'sr-only' />
43+ { /* left gradient blur */ }
44+ < div className = 'from-background absolute top-0 left-0 h-full w-6 bg-gradient-to-r to-transparent' />
45+ { /* right gradient blur */ }
46+ < div className = 'from-background absolute top-0 right-0 h-full w-6 bg-gradient-to-l to-transparent' />
47+ </ ScrollArea >
4048 </ motion . div >
4149 </ Link >
4250 ) ;
0 commit comments