sipracd / frontend /src /components /SectionCard.tsx
Guilherme Silberfarb Costa
Deploy current SIPRAC app snapshot
7fabf33
raw
history blame contribute delete
440 Bytes
import type { PropsWithChildren, ReactNode } from "react";
export function SectionCard({
title,
action,
children,
}: PropsWithChildren<{ title?: string; action?: ReactNode }>) {
return (
<section className="section-card">
{title || action ? (
<div className="section-header">
{title ? <h3>{title}</h3> : <span />}
{action}
</div>
) : null}
{children}
</section>
);
}