forked from casper-network/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Hero.tsx
26 lines (22 loc) · 840 Bytes
/
Hero.tsx
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
import React from "react";
import { Button } from "../../atoms";
import styles from "./Hero.module.scss";
export interface HeroProps {
title?: string;
subTitle?: string;
actionLabel?: string;
actionTo?: string;
children?: React.ReactNode;
image_title: string;
}
export const Hero = (props: HeroProps) => {
return (
<div className={styles.heroContainer}>
<img className={styles.heroBg} alt={props.image_title ? `${props.image_title}` : props.title ? `${props.title}` : `Hero`} src="/icon/curves.svg" />
<h1>{props.title}</h1>
<h4>{props?.subTitle}</h4>
<Button className={styles.actionBtn} label={props.actionLabel} to={props.actionTo} />
{!!props.children && <div className={styles.content}>{props.children}</div>}
</div>
);
};