import React from 'react' import PropTypes from 'prop-types' import classNames from 'classnames' import ImageNext from 'next/image' import Link from './link' import { H5 } from './typography' import classes from '../styles/card.module.sass' export default function Card({ title, to, image, header, small, onClick, children }) { return (
{header && ( {header} )} {(title || image) && (
{image && (
)} {title && ( {title} )}
)} {children}
) } Card.propTypes = { title: PropTypes.node, header: PropTypes.node, to: PropTypes.string, image: PropTypes.string, onClick: PropTypes.func, children: PropTypes.node, }