import styles from "./pageHeader.module.scss";

export const PageHeader = ({
  heading,
  lead,
  align
}: {
  heading: string;
  lead?: string | null;
  align?: "center" | "left"
}) => {
  return (
    <div className={`${styles.pageHeader} ${align && styles[align]}`}>
      <h1 className={styles.title}>{heading}</h1>
      {lead && (
        <div className="lead" dangerouslySetInnerHTML={{ __html: lead }} />
      )}
    </div>
  );
};
