Samuel Shuert | 016ea02 | 2021-09-01 16:17:24 -0500 | [diff] [blame] | 1 | import { Component } from "react"; |
| 2 | import Styles from '../styles/card.module.css'; |
| 3 | |
| 4 | class Card extends Component { |
| 5 | constructor(props) { |
| 6 | super(props); |
| 7 | } |
| 8 | |
| 9 | |
| 10 | render() { |
| 11 | return ( |
pineafan | a5ce910 | 2021-09-02 17:21:31 +0100 | [diff] [blame^] | 12 | <div className={Styles.card} style={{ |
| 13 | backgroundImage:`linear-gradient(69.44deg, #${this.props.gradient[0]} 0%, #${this.props.gradient[1]} 100%)`, |
| 14 | margin: "0" |
| 15 | }}> |
| 16 | <img className={Styles.backgroundImage} src={`/Waves/${this.props.wave}.svg`} /> |
| 17 | <div className={Styles.panel}> |
| 18 | <div className={Styles.titleContainer}> |
| 19 | <img className={Styles.image} src={"/Icons/" + this.props.wave + ".svg"} /> |
| 20 | <h1 className={Styles.title}>{this.props.title}</h1> |
| 21 | </div> |
| 22 | <p className={Styles.subtext}>{this.props.subtext}</p> |
| 23 | <div className={Styles.buttonLayout}> |
| 24 | { |
| 25 | this.props.buttons ? this.props.buttons.map(button => { |
| 26 | return <a |
| 27 | className={Styles.button} |
| 28 | style={{backgroundColor:`#${button.color}`, color:`#${this.props.buttonText}`}} |
| 29 | href={button.link}>{button.text} |
| 30 | </a> |
| 31 | }) : null |
| 32 | } |
| 33 | </div> |
Samuel Shuert | 016ea02 | 2021-09-01 16:17:24 -0500 | [diff] [blame] | 34 | </div> |
| 35 | </div> |
| 36 | ) |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | export default Card; |