blob: e8442deebaa077d36b03256c90203eea6766d2c0 [file] [log] [blame]
Samuel Shuert016ea022021-09-01 16:17:24 -05001import { Component } from "react";
2import Styles from '../styles/card.module.css';
3
4class Card extends Component {
5 constructor(props) {
6 super(props);
Samuel Shuert52f37772021-09-02 12:29:40 -05007 }
Samuel Shuert016ea022021-09-01 16:17:24 -05008
9 render() {
10 return (
pineafana5ce9102021-09-02 17:21:31 +010011 <div className={Styles.card} style={{
12 backgroundImage:`linear-gradient(69.44deg, #${this.props.gradient[0]} 0%, #${this.props.gradient[1]} 100%)`,
13 margin: "0"
14 }}>
15 <img className={Styles.backgroundImage} src={`/Waves/${this.props.wave}.svg`} />
16 <div className={Styles.panel}>
17 <div className={Styles.titleContainer}>
18 <img className={Styles.image} src={"/Icons/" + this.props.wave + ".svg"} />
19 <h1 className={Styles.title}>{this.props.title}</h1>
20 </div>
21 <p className={Styles.subtext}>{this.props.subtext}</p>
22 <div className={Styles.buttonLayout}>
23 {
Samuel Shuert604e31d2021-09-02 16:06:20 -050024 this.props.buttons ? this.props.buttons.map((button, i) => {
pineafana5ce9102021-09-02 17:21:31 +010025 return <a
Samuel Shuert604e31d2021-09-02 16:06:20 -050026 key={i}
pineafana5ce9102021-09-02 17:21:31 +010027 className={Styles.button}
28 style={{backgroundColor:`#${button.color}`, color:`#${this.props.buttonText}`}}
Samuel Shuert52f37772021-09-02 12:29:40 -050029 href={button.link}
30 target={button.newTab ? "_blank" : undefined}>{button.text}
pineafana5ce9102021-09-02 17:21:31 +010031 </a>
32 }) : null
33 }
34 </div>
Samuel Shuert016ea022021-09-01 16:17:24 -050035 </div>
36 </div>
37 )
38 }
39}
40
41export default Card;