Bettersplit/src/components/section.tsx
2025-04-04 12:33:03 +02:00

24 lines
437 B
TypeScript

import { cn } from "@/lib/utils";
import React from "react";
function Section({
children,
heading,
className,
}: {
children?: React.ReactNode;
heading?: string;
className?: string;
}) {
return (
<section className={cn("px-4 space-y-4", className)}>
{heading?.length ? (
<h2 className=" text-xl font-semibold">{heading}</h2>
) : null}
{children}
</section>
);
}
export default Section;