import * as React from "react"; import { Reveal } from "./Reveal"; import { Label } from "./Typography"; import { cn } from "../utils/cn"; interface SectionProps { number?: string; title?: string; children: React.ReactNode; className?: string; delay?: number; variant?: "white" | "gray" | "glass"; borderTop?: boolean; borderBottom?: boolean; containerVariant?: "narrow" | "normal" | "wide"; illustration?: React.ReactNode; effects?: React.ReactNode; } export const Section: React.FC = ({ number, title, children, className = "", delay = 0, variant = "white", borderTop = false, borderBottom = false, containerVariant = "narrow", illustration, effects, }) => { const hasSidebar = !!(number || title || illustration); const bgClass = { white: "bg-white", gray: "bg-slate-50/50", glass: "glass-subtle", }[variant]; const borderTopClass = borderTop ? "border-t border-slate-100" : ""; const borderBottomClass = borderBottom ? "border-b border-slate-100" : ""; const containerClass = containerVariant === "wide" ? "wide-container" : containerVariant === "normal" ? "container" : "narrow-container"; return (
{/* Tech divider with binary accent */} {borderTop && (
)} {/* Optional effects layer */} {effects}
{hasSidebar ? (
{/* Sidebar: Number & Title */}
{number && ( {number} )} {title && (
)}
{illustration && (
{illustration}
)}
{/* Main Content */}
{children}
) : (
{children}
)}
); };