diff options
Diffstat (limited to 'src/components/landing/Subtitle.tsx')
-rw-r--r-- | src/components/landing/Subtitle.tsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/components/landing/Subtitle.tsx b/src/components/landing/Subtitle.tsx index d514f71..862ea3c 100644 --- a/src/components/landing/Subtitle.tsx +++ b/src/components/landing/Subtitle.tsx | |||
@@ -12,13 +12,18 @@ export default function Subtitle({ | |||
12 | icon, | 12 | icon, |
13 | children, | 13 | children, |
14 | }: { | 14 | }: { |
15 | icon: string; | 15 | icon?: string; |
16 | children?: ReactNode; | 16 | children?: ReactNode; |
17 | }) { | 17 | }) { |
18 | return ( | 18 | return ( |
19 | <h3 className={styles.subtitle}> | 19 | <h3 className={styles.subtitle}> |
20 | {icon !== undefined && <>{icon} </>} | 20 | {icon !== undefined && <span aria-hidden="true">{icon} </span>} |
21 | {children} | 21 | {children} |
22 | </h3> | 22 | </h3> |
23 | ); | 23 | ); |
24 | } | 24 | } |
25 | |||
26 | Subtitle.defaultProps = { | ||
27 | icon: undefined, | ||
28 | children: undefined, | ||
29 | }; | ||