blob: 46c0bf7c46f66940f70e3f019fd1bd230693e7ce [file] [log] [blame]
import { Component } from "react";
import Styles from '../styles/header.module.css';
class Header extends Component {
constructor(props) {
super(props);
this.keys = []
}
render() {
return (
<div className={Styles.header} style={{
backgroundImage:`linear-gradient(69.44deg, #${this.props.gradient[0]} 0%, #${this.props.gradient[1]} 100%)`,
margin: "0"
}} id={this.props.id ? this.props.id : null}>
<img className={Styles.backgroundImage} src={`/Headers/${this.props.wave}.svg`} />
<div className={Styles.panel}>
<div className={Styles.titleContainer}>
<h1 className={Styles.title}>{this.props.name}</h1>
</div>
<p className={Styles.subtext + " " + (this.props.buttons.length ? Styles.subtextExtra : null)}>{this.props.subtext}</p>
<div className={Styles.buttonLayout}>
{
this.props.buttons ? this.props.buttons.map((button, index) => {
return <a
key={index}
className={Styles.button}
style={{backgroundColor:`#${button.color}`, color:`#${button.buttonText}`}}
href={button.link}>{button.text}
</a>
}) : null
}
</div>
</div>
<span className={Styles.arrowSpan + " " + (this.props.hideArrow ? Styles.arrowHidden : null)}>
<a href="#start"><img src="/Arrow.svg" className={Styles.arrow} /></a>
</span>
</div>
)
}
}
export default Header;