Files
plast-track/frontend/src/components/Panel.tsx
2026-06-15 13:35:22 +01:00

23 lines
524 B
TypeScript

import { PropsWithChildren, ReactNode } from "react";
type PanelProps = PropsWithChildren<{
title: string;
subtitle?: string;
actions?: ReactNode;
}>;
export default function Panel({ title, subtitle, actions, children }: PanelProps) {
return (
<section className="panel">
<header className="panel__header">
<div>
<p className="eyebrow">{title}</p>
{subtitle ? <h2>{subtitle}</h2> : null}
</div>
{actions}
</header>
{children}
</section>
);
}