24 lines
586 B
TypeScript
24 lines
586 B
TypeScript
import type { ReactNode } from 'react';
|
|
|
|
type SectionProps = {
|
|
eyebrow?: string;
|
|
title: string;
|
|
description?: string;
|
|
children: ReactNode;
|
|
id?: string;
|
|
};
|
|
|
|
export function Section({ eyebrow, title, description, children, id }: SectionProps) {
|
|
return (
|
|
<section id={id} className="section-shell">
|
|
<div className="section-heading">
|
|
{eyebrow ? <p className="section-eyebrow">{eyebrow}</p> : null}
|
|
<h2>{title}</h2>
|
|
{description ? <p className="section-description">{description}</p> : null}
|
|
</div>
|
|
{children}
|
|
</section>
|
|
);
|
|
}
|
|
|