aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/landing/Subtitle.tsx
blob: 862ea3ca20b0e5b34a1f7cf70cd2e59ea33c2b9d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * SPDX-FileCopyrightText: 2023 Kristóf Marussy
 *
 * SPDX-License-Identifier: MIT
 */

import type { ReactNode } from 'react';

import styles from './Subtitle.module.css';

export default function Subtitle({
  icon,
  children,
}: {
  icon?: string;
  children?: ReactNode;
}) {
  return (
    <h3 className={styles.subtitle}>
      {icon !== undefined && <span aria-hidden="true">{icon}&nbsp;</span>}
      {children}
    </h3>
  );
}

Subtitle.defaultProps = {
  icon: undefined,
  children: undefined,
};