@@ -47,52 +47,22 @@ export default function App() {
47
47
< div className = "font-black text-2xl text-white" > Trellix</ div >
48
48
< div className = "text-slate-500" > a Remix Demo</ div >
49
49
</ Link >
50
- < div className = "flex items-center" >
51
- < a
52
- href = "https://remix.run/docs"
53
- className = "flex-1 block text-center w-20"
54
- >
55
- < img
56
- src = "/yt_icon_mono_dark.png"
57
- alt = "YouTube Logo"
58
- className = "inline-block h-8"
59
- />
60
- < br />
61
- < a
62
- href = "https://www.youtube.com/watch?v=RTHzZVbTl6c& list = PLXoynULbYuED9b2k5LS44v9TQjfXifwNu & pp = gAQBiAQB "
63
- className = "text-slate-500 text-xs uppercase font-bold"
64
- >
65
- Videos
66
- </ a >
67
- </ a >
68
- < a
50
+ < div className = "flex items-center gap-6" >
51
+ < IconLink
52
+ href = "https://www.youtube.com/watch?v=RTHzZVbTl6c& list = PLXoynULbYuED9b2k5LS44v9TQjfXifwNu & pp = gAQBiAQB "
53
+ icon = "/yt_icon_mono_dark.png"
54
+ label = "Videos"
55
+ />
56
+ < IconLink
69
57
href = "https://github.com/remix-run/example-trellix"
70
- className = "block text-center flex-1 w-20"
71
- >
72
- < img
73
- src = "/github-mark-white.png"
74
- alt = "GitHub Octocat Logo: A cat with an octopus tentacle arm"
75
- className = "inline-block h-8"
76
- />
77
- < br />
78
- < span className = "text-slate-500 text-xs uppercase font-bold" >
79
- Source
80
- </ span >
81
- </ a >
82
- < a
58
+ label = "Source"
59
+ icon = "/github-mark-white.png"
60
+ />
61
+ < IconLink
83
62
href = "https://remix.run/docs/en/main"
84
- className = "block text-center flex-1 w-20"
85
- >
86
- < img
87
- src = "/r.png"
88
- alt = "Remix Logo"
89
- className = "inline-block h-8"
90
- />
91
- < br />
92
- < span className = "text-slate-500 text-xs uppercase font-bold" >
93
- Docs
94
- </ span >
95
- </ a >
63
+ icon = "/r.png"
64
+ label = "Docs"
65
+ />
96
66
</ div >
97
67
< div className = "w-1/3 flex justify-end" >
98
68
{ userId ? (
@@ -129,3 +99,23 @@ export default function App() {
129
99
</ html >
130
100
) ;
131
101
}
102
+
103
+ function IconLink ( {
104
+ icon,
105
+ href,
106
+ label,
107
+ } : {
108
+ icon : string ;
109
+ href : string ;
110
+ label : string ;
111
+ } ) {
112
+ return (
113
+ < a
114
+ href = { href }
115
+ className = "text-slate-500 text-xs uppercase font-bold text-center"
116
+ >
117
+ < img src = { icon } aria-hidden className = "inline-block h-8" />
118
+ < span className = "block mt-2" > { label } </ span >
119
+ </ a >
120
+ ) ;
121
+ }
0 commit comments