1- import { Fragment } from "react"
1+ import { Fragment , ReactNode } from "react"
22
33import { Marquee } from "@/app/conf/_design-system/marquee"
44
55import CodeIcon from "../../pixelarticons/code.svg?svgr"
66
77import blurWave from "./blur.webp"
88import { StripesDecoration } from "@/app/conf/_design-system/stripes-decoration"
9+ import { clsx } from "clsx"
910
10- const keywords = [
11- [ "COMMUNITY" , "DEVELOPER EXPERIENCE" , "APIs" , "TOOLS & LIBRARIES" ] ,
12- [ "OPEN SOURCE" , "FEDERATION" , "ECOSYSTEMS" , "TRACING & OBSERVABILITY" ] ,
13- [ "BEST PRACTICES" , "WORKSHOPS" , "SCHEMAS" , "SECURITY" ] ,
14- ]
11+ export interface MarqueeRowsProps extends React . HTMLAttributes < HTMLDivElement > {
12+ items : ReactNode [ ] [ ]
13+ variant : "primary" | "secondary"
14+ }
15+
16+ export function MarqueeRows ( {
17+ items,
18+ className,
19+ variant,
20+ ...rest
21+ } : MarqueeRowsProps ) {
22+ const separator = (
23+ < CodeIcon
24+ className = { clsx (
25+ "size-8 md:size-10" ,
26+ variant === "primary"
27+ ? "text-pri-dark dark:text-pri-light"
28+ : "text-pri-base" ,
29+ ) }
30+ />
31+ )
1532
16- export function MarqueeUnderHero ( ) {
1733 return (
18- < section className = "relative pt-4 font-mono text-xl/none text-pri-base max-sm:pb-1 sm:pt-6 md:space-y-2 md:pt-12 md:text-[56px]/none xl:pt-16" >
19- < Stripes />
20- { keywords . map ( ( row , i ) => (
34+ < section
35+ className = { clsx (
36+ "relative font-mono text-xl/none md:text-[56px]/none" ,
37+ variant === "primary" ? "text-pri-base" : "text-neu-900" ,
38+ className ,
39+ ) }
40+ { ...rest }
41+ >
42+ { variant === "primary" && < Stripes /> }
43+ { items . map ( ( row , i ) => (
2144 < Marquee
2245 key = { i }
2346 gap = { 16 }
@@ -26,13 +49,12 @@ export function MarqueeUnderHero() {
2649 className = "relative *:select-none"
2750 reverse = { i % 2 === 1 }
2851 drag
52+ separator = { separator }
2953 >
30- { row . map ( ( keyword , j ) => (
31- < Fragment key = { keyword } >
32- < span > { keyword } </ span >
33- { j !== row . length - 1 && (
34- < CodeIcon className = "size-8 text-pri-dark dark:text-pri-light md:size-10" />
35- ) }
54+ { row . map ( ( item , j ) => (
55+ < Fragment key = { j } >
56+ { item }
57+ { j !== row . length - 1 && separator }
3658 </ Fragment >
3759 ) ) }
3860 </ Marquee >
0 commit comments