import type { ReactNode } from 'react';
import './BasePageHeader.scss';

interface Props {
  title: string;
  subtitle?: string;
  actions?: ReactNode;
}

export default function BasePageHeader({ title, subtitle, actions }: Props) {
  return (
    <div className="page-header">
      <div className="page-header__text">
        <h1 className="page-header__title">{title}</h1>
        {subtitle && <p className="page-header__subtitle">{subtitle}</p>}
      </div>
      {actions && <div className="page-header__actions">{actions}</div>}
    </div>
  );
}
