File size: 1,046 Bytes
d725335
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import type { ReactNode } from "react"
import type { DashboardSection } from "@/modules/registry"

export function Section({
  section,
  children,
}: {
  section: DashboardSection
  children: ReactNode
}) {
  return (
    <section id={section.id} className="scroll-mt-20">
      {/* labeled horizontal separator */}
      <div className="mb-5 flex items-center gap-4">
        <div className="flex items-baseline gap-2.5">
          <span className="font-mono text-[0.625rem] tabular-nums text-primary/70">
            {String(section.order).padStart(2, "0")}
          </span>
          <h2 className="font-display text-base font-semibold tracking-tight text-foreground">
            {section.label}
          </h2>
          <span className="font-mono text-[0.625rem] uppercase tracking-[0.16em] text-muted-foreground">
            {section.hint}
          </span>
        </div>
        <div className="h-px flex-1 hairline" />
      </div>

      <div className="grid grid-cols-1 gap-5 lg:grid-cols-12">{children}</div>
    </section>
  )
}