Initial Plast Track MVP
This commit is contained in:
22
frontend/src/components/Panel.tsx
Normal file
22
frontend/src/components/Panel.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user