| 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> | |
| ); | |
| } | |