2020-06-14 13:22:07 +00:00
|
|
|
import React from "react";
|
|
|
|
import PropTypes from "prop-types";
|
|
|
|
import styles from "./modules/CaseCard.module.css";
|
2020-06-14 14:45:20 +00:00
|
|
|
import Avatar from "./Avatar";
|
2020-06-14 13:22:07 +00:00
|
|
|
|
|
|
|
export default function CaseCard(props) {
|
|
|
|
const study = props.study;
|
|
|
|
|
|
|
|
return (
|
2020-06-14 14:45:20 +00:00
|
|
|
<a className={styles.container}>
|
2020-06-14 13:22:07 +00:00
|
|
|
<img
|
|
|
|
className={`${styles.cover}`}
|
|
|
|
src={props.study.cover}
|
|
|
|
alt="The one and only bongo cat!"
|
|
|
|
/>
|
2020-06-14 14:45:20 +00:00
|
|
|
<div className={styles.avatarHolder}>
|
|
|
|
<Avatar size={"small"} />
|
|
|
|
</div>
|
|
|
|
|
2020-06-14 13:22:07 +00:00
|
|
|
<div className={styles.cardInfo}>
|
|
|
|
<b className={styles.title}>{study.title}</b>
|
|
|
|
<p className={styles.description}>{study.short_description}</p>
|
|
|
|
<b>{study.date}</b>
|
|
|
|
</div>
|
2020-06-14 14:45:20 +00:00
|
|
|
</a>
|
2020-06-14 13:22:07 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
CaseCard.propTypes = {
|
|
|
|
study: PropTypes.object.isRequired,
|
|
|
|
};
|