Files
website/components/Section.tsx
Kalidou Diagne 154d832d49 website v2
2024-04-05 13:01:20 +01:00

21 lines
644 B
TypeScript

import { HTMLAttributes } from "react";
import { Label } from "./ui/Label";
import { AppMarkdown } from "./AppMarkdown";
interface SectionProps extends HTMLAttributes<HTMLDivElement> {
title: string;
description?: string;
}
export const Section = ({ title, description, children }: SectionProps) => {
return (
<div className="flex flex-col gap-6 md:gap-16">
<div className="flex flex-col gap-4 md:gap-8">
<Label.SectionTitle className="text-center">{title}</Label.SectionTitle>
{description && <AppMarkdown>{description}</AppMarkdown>}
</div>
{children && <div>{children}</div>}
</div>
);
};