1
+ import clsx from 'clsx'
1
2
import { NavLink , Outlet } from 'react-router'
2
3
import { ButtonLink } from '#src/components/button.tsx'
3
4
import { Icon } from '#src/components/icon.tsx'
4
5
import { recipients } from '#src/data.json'
5
6
6
7
export function RecipientsLayout ( ) {
7
8
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" >
9
10
< div className = "mb-8 flex items-center justify-between" >
10
11
< h1 className = "text-4xl font-bold" > Recipients</ h1 >
11
12
< ButtonLink
@@ -20,23 +21,24 @@ export function RecipientsLayout() {
20
21
</ div >
21
22
22
23
< 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" >
24
25
{ recipients . map ( ( recipient ) => (
25
26
< NavLink
26
27
key = { recipient . id }
27
28
to = { `/recipients/${ recipient . id } ` }
28
29
className = { ( { isActive } ) =>
29
- isActive
30
- ? 'flex items-center gap-2 text-xl underline'
31
- : 'text-xl'
30
+ clsx ( 'text-xl' , isActive ? 'underline' : '' )
32
31
}
33
32
>
34
33
{ ( { isActive } ) => (
35
- < div className = "flex items-center gap-2 " >
34
+ < div className = "flex items-center gap-1 " >
36
35
< Icon
37
36
name = "ArrowRight"
38
37
size = "sm"
39
- className = { isActive ? 'opacity-100' : 'opacity-0' }
38
+ className = { clsx (
39
+ isActive ? 'opacity-100' : 'opacity-0' ,
40
+ 'transition-opacity' ,
41
+ ) }
40
42
/>
41
43
{ recipient . name }
42
44
</ div >
0 commit comments