Make subtitle optional

This commit is contained in:
e26chiu 2022-11-04 09:07:56 -04:00
parent bd6459b592
commit 40f9de6463
1 changed files with 2 additions and 2 deletions

View File

@ -4,14 +4,14 @@ import styles from "./SectionHeader.module.css";
interface SectionHeaderProps {
title: string;
subtitle: string;
subtitle?: string;
}
export function SectionHeader({ title, subtitle }: SectionHeaderProps) {
return (
<div className={styles.header}>
<h1 className={styles.title}>{title}</h1>
<h5 className={styles.subTitle}>{subtitle}</h5>
{subtitle && <h5 className={styles.subTitle}>{subtitle}</h5>}
</div>
);
}