import React from 'react';
import PropTypes from 'prop-types';
import './Card.css';
const Card = ({
type, id, title, subtitle, refresh, bodyType, children,
}) => (
{(title || subtitle) && (
{title && (
{title}
)}
{subtitle && (
)}
{refresh && (
{refresh}
)}
)}
{children}
);
Card.propTypes = {
id: PropTypes.string,
title: PropTypes.string,
subtitle: PropTypes.string,
bodyType: PropTypes.string,
type: PropTypes.string,
refresh: PropTypes.node,
children: PropTypes.node.isRequired,
};
export default Card;