23 lines
437 B
TypeScript
23 lines
437 B
TypeScript
interface SectionProps {
|
|
children: React.ReactNode;
|
|
className?: string;
|
|
id?: string;
|
|
as?: "section" | "div";
|
|
}
|
|
|
|
export function Section({
|
|
children,
|
|
className = "",
|
|
id,
|
|
as: Component = "section",
|
|
}: SectionProps) {
|
|
return (
|
|
<Component
|
|
id={id}
|
|
className={`py-[var(--spacing-section)] relative ${className}`}
|
|
>
|
|
{children}
|
|
</Component>
|
|
);
|
|
}
|