blob: ba38249ae75b530b4bd4d3a9aaf1b8e5e3f2be0c [file] [log] [blame]
pineafana5ce9102021-09-02 17:21:31 +01001import { Component } from "react";
2import Styles from '../styles/header.module.css';
3
4class Header extends Component {
5 constructor(props) {
6 super(props);
7 }
8
9
10 render() {
11 return (
12 <div className={Styles.header} style={{
13 backgroundImage:`linear-gradient(69.44deg, #${this.props.gradient[0]} 0%, #${this.props.gradient[1]} 100%)`,
14 margin: "0"
15 }} id={this.props.id ? this.props.id : null}>
16 <img className={Styles.backgroundImage} src={`/Headers/${this.props.wave}.svg`} />
17 <div className={Styles.panel}>
18 <div className={Styles.titleContainer}>
19 <h1 className={Styles.title}>{this.props.name}</h1>
20 </div>
21 <p className={Styles.subtext + " " + (this.props.buttons.length ? Styles.subtextExtra : null)}>{this.props.subtext}</p>
22 <div className={Styles.buttonLayout}>
23 {
24 this.props.buttons ? this.props.buttons.map(button => {
25 return <a
26 className={Styles.button}
27 style={{backgroundColor:`#${button.color}`, color:`#${button.buttonText}`}}
28 href={button.link}>{button.text}
29 </a>
30 }) : null
31 }
32 </div>
33 </div>
34 <span className={Styles.arrowSpan + " " + (this.props.hideArrow ? Styles.arrowHidden : null)}>
35 <img src="/Arrow.svg" className={Styles.arrow} />
36 </span>
37 </div>
38 )
39 }
40}
41
42export default Header;