import type { FC, Child } from "hono/jsx";

interface PageHeaderProps {
  title: string;
  description?: string;
  action?: Child;
}

export const PageHeader: FC<PageHeaderProps> = ({ title, description, action }) => (
  <div class="page-header">
    <div class="page-header__text">
      <h1>{title}</h1>
      {description && <p>{description}</p>}
    </div>
    {action && <div class="page-header__action">{action}</div>}
  </div>
);
