"use client"; import type React from "react"; import { motion, Variants } from "framer-motion"; import { Reveal } from "./Reveal"; interface SectionProps { id?: string; eyebrow?: string; title: string; description?: string; dark?: boolean; aside?: React.ReactNode; children: React.ReactNode; disableChildrenAnimation?: boolean; } export const Section = ({ id, eyebrow, title, description, dark, aside, children, disableChildrenAnimation = false, }: SectionProps) => { const baseClass = dark ? "ds-section ds-section-dark" : "ds-section"; const itemVariants: Variants = { hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0, transition: { duration: 0.6, ease: "easeOut" } } }; return (
{eyebrow && ( {eyebrow} )} {title} {description && ( {description} )}
{aside && {aside}}
{!disableChildrenAnimation ? (
{children}
) : (
{children}
)}
); };