1+ import clsx from 'clsx'
12import { NavLink , Outlet } from 'react-router'
23import { ButtonLink } from '#src/components/button.tsx'
34import { Icon } from '#src/components/icon.tsx'
45import { recipients } from '#src/data.json'
56
67export function RecipientsLayout ( ) {
78 return (
8- < div className = "container mx-auto flex min-h-0 flex-grow flex-col p -4 md:p -8" >
9+ < div className = "container mx-auto flex min-h-0 flex-grow flex-col px -4 pt-4 md:px-8 md:pt -8" >
910 < div className = "mb-8 flex items-center justify-between" >
1011 < h1 className = "text-4xl font-bold" > Recipients</ h1 >
1112 < ButtonLink
@@ -20,23 +21,24 @@ export function RecipientsLayout() {
2021 </ div >
2122
2223 < div className = "bg-background-alt flex min-h-0 flex-1 flex-col md:flex-row" >
23- < div className = "flex max-h-32 min-h-32 flex-col gap-4 overflow-auto border-b-2 px-8 py-4 md:max-h-none md:min-w-32 md:border-r md:border-b-0" >
24+ < div className = "flex max-h-32 min-h-32 flex-col gap-4 overflow-auto border-b-2 py-4 pr-4 pl-1 md:max-h-none md:min-w-32 md:border-r md:border-b-0" >
2425 { recipients . map ( ( recipient ) => (
2526 < NavLink
2627 key = { recipient . id }
2728 to = { `/recipients/${ recipient . id } ` }
2829 className = { ( { isActive } ) =>
29- isActive
30- ? 'flex items-center gap-2 text-xl underline'
31- : 'text-xl'
30+ clsx ( 'text-xl' , isActive ? 'underline' : '' )
3231 }
3332 >
3433 { ( { isActive } ) => (
35- < div className = "flex items-center gap-2 " >
34+ < div className = "flex items-center gap-1 " >
3635 < Icon
3736 name = "ArrowRight"
3837 size = "sm"
39- className = { isActive ? 'opacity-100' : 'opacity-0' }
38+ className = { clsx (
39+ isActive ? 'opacity-100' : 'opacity-0' ,
40+ 'transition-opacity' ,
41+ ) }
4042 />
4143 { recipient . name }
4244 </ div >
0 commit comments