import React from 'react'; import { CardHeader, ICardHeader } from './CardHeader'; import { CardBody, ICardBody } from './CardBody'; import { CardFooter, ICardFooter } from './CardFooter'; export interface ICard { className?: any; onClick?(): void; style?: React.CSSProperties; [x: string]: any; } export interface ICardSubComponents { Header: React.FC; Body: React.FC; Footer: React.FC; } export const Card: React.FC & ICardSubComponents = (props) => { const { children, className = '', onClick, style, ...otherProps } = props; return (
{children}
); }; Card.Header = CardHeader; Card.Body = CardBody; Card.Footer = CardFooter;