@@ -158,11 +158,8 @@ export function WhyInteractive(props: {
158
158
} , [ active , autoActive , duration , items . length ] ) ;
159
159
160
160
return (
161
- < div
162
- id = "why-interactive"
163
- className = "mt-8 flex flex-col gap-4 rounded-lg border border-fd-foreground/10 bg-fd-muted/50 p-4 shadow-lg lg:flex-row lg:gap-6 lg:p-6 max-lg:-mx-8"
164
- >
165
- < div className = "-mt-1.5 flex flex-row overflow-x-auto max-lg:-mx-4 max-lg:items-center max-lg:px-2 lg:-ml-4 lg:flex-col" >
161
+ < div id = "why-interactive" className = "flex flex-col gap-6 md:flex-row" >
162
+ < div className = "flex flex-col mt-1.5 border h-fit" >
166
163
{ items . map ( ( item , i ) => (
167
164
< button
168
165
key = { item }
@@ -176,11 +173,10 @@ export function WhyInteractive(props: {
176
173
} }
177
174
type = "button"
178
175
className = { cn (
179
- 'inline-flex flex-col-reverse text-nowrap rounded-lg py-1.5 text-start text-sm font-medium text-fd-muted-foreground transition-colors max-lg: px-2 lg:flex-row ' ,
176
+ 'inline-flex flex-col text-nowrap py-1.5 text-start text-sm text-fd-muted-foreground font-medium px-2' ,
180
177
i === active
181
- ? 'text-primary max-lg: bg-fd-primary/10 '
178
+ ? 'text-fd- primary-foreground bg-fd-primary'
182
179
: 'hover:text-fd-accent-foreground/80' ,
183
- i === active && autoActive ? '' : 'max-lg:pb-2.5 lg:pl-3' ,
184
180
) }
185
181
onClick = { ( ) => {
186
182
if ( active === i ) setAutoActive ( ( prev ) => ! prev ) ;
@@ -190,16 +186,17 @@ export function WhyInteractive(props: {
190
186
}
191
187
} }
192
188
>
189
+ { item }
193
190
{ i === active && autoActive ? (
194
191
< div
195
- className = "animate-[why-interactive-x] rounded-lg bg-fd-primary max-lg: h-1 lg:mr-2 lg:w-1 lg:animate-[why-interactive-y] "
192
+ className = "animate-[why-interactive-x] bg-fd-primary-foreground h-1"
196
193
style = { {
197
194
animationDuration : `${ duration . toString ( ) } ms` ,
195
+ animationTimingFunction : 'linear' ,
198
196
animationFillMode : 'forwards' ,
199
197
} }
200
198
/>
201
199
) : null }
202
- { item }
203
200
</ button >
204
201
) ) }
205
202
</ div >
@@ -213,23 +210,13 @@ export function WhyInteractive(props: {
213
210
to {
214
211
width: 100%;
215
212
}
216
- }
217
-
218
- @keyframes why-interactive-y {
219
- from {
220
- height: 0px;
221
- }
222
-
223
- to {
224
- height: 100%;
225
- }
226
213
}` }
227
214
</ style >
228
215
229
216
< div className = "flex-1" >
230
217
{ active === 0 ? (
231
218
< WhyPanel >
232
- < h3 className = "mb-2 text-lg font-medium " >
219
+ < h3 className = "mb-4 text-lg font-semibold " >
233
220
Implementing search is difficult, we made it simple.
234
221
</ h3 >
235
222
< p >
@@ -260,7 +247,7 @@ export function WhyInteractive(props: {
260
247
261
248
{ active === 1 ? (
262
249
< WhyPanel >
263
- < h3 className = "mb-2 text-lg font-medium " > Tailwind CSS Plugin</ h3 >
250
+ < h3 className = "mb-4 text-lg font-semibold " > Tailwind CSS Plugin</ h3 >
264
251
< p >
265
252
Share the same design system cross the docs and your app with
266
253
Tailwind CSS. Works great with < b > Shadcn UI</ b > .
@@ -277,7 +264,7 @@ export function WhyInteractive(props: {
277
264
278
265
{ active === 2 ? (
279
266
< WhyPanel >
280
- < h3 className = "mb-2 text-lg font-medium " >
267
+ < h3 className = "mb-4 text-lg font-semibold " >
281
268
From the source of truth, never repeat yourself again.
282
269
</ h3 >
283
270
< p >
@@ -308,7 +295,7 @@ export function WhyInteractive(props: {
308
295
) : null }
309
296
{ active === 3 ? (
310
297
< WhyPanel >
311
- < h3 className = "mb-2 text-lg font-medium " >
298
+ < h3 className = "mb-4 text-lg font-semibold " >
312
299
Interactive docs with React.
313
300
</ h3 >
314
301
< p >
@@ -326,7 +313,7 @@ export function WhyInteractive(props: {
326
313
) : null }
327
314
{ active === 4 ? (
328
315
< WhyPanel >
329
- < h3 className = "mb-2 text-lg font-medium " >
316
+ < h3 className = "mb-4 text-lg font-semibold " >
330
317
Connect your content and server.
331
318
</ h3 >
332
319
@@ -341,7 +328,7 @@ export function WhyInteractive(props: {
341
328
) : null }
342
329
{ active === 5 ? (
343
330
< WhyPanel >
344
- < h3 className = "mb-2 text-lg font-medium " >
331
+ < h3 className = "mb-4 text-lg font-semibold " >
345
332
Your own content source, search solution, everything.
346
333
</ h3 >
347
334
< p >
0 commit comments