import { PropsWithChildren, ReactNode } from "react";

type PageProps = PropsWithChildren<{
  title: string;
  subtitle: string;
  actions?: ReactNode;
}>;

export function Page({ title, subtitle, actions, children }: PageProps) {
  return (
    <section className="page">
      <div className="page-header">
        <div>
          <h3>{title}</h3>
          <p>{subtitle}</p>
        </div>
        {actions}
      </div>
      {children}
    </section>
  );
}
