//@flow import * as React from "react"; import injectSheet from "react-jss"; import classNames from "classnames"; import { Link } from "react-router-dom"; const styles = { inner: { position: "relative", pointerEvents: "none", zIndex: 1 }, innerLink: { pointerEvents: "all" }, centerImage: { marginTop: "0.8em", marginLeft: "1em !important" }, flexFullHeight: { display: "flex", flexDirection: "column", alignSelf: "stretch" }, content: { display: "flex", flexGrow: 1 }, footer: { display: "flex", marginTop: "auto", paddingBottom: "1.5rem" } }; type Props = { title: string, description: string, avatar: React.Node, footerLeft: React.Node, footerRight: React.Node, link: string, // context props classes: any }; class CardColumn extends React.Component { createLink = () => { const { link } = this.props; if (link) { return ; } return null; }; render() { const { avatar, title, description, footerLeft, footerRight, classes } = this.props; const link = this.createLink(); return ( <> {link}
{avatar}

{title}

{description}

{footerLeft}
{footerRight}
); } } export default injectSheet(styles)(CardColumn);