2020-12-08 21:10:29 +03:00
|
|
|
import { CardProps } from 'reactstrap/lib/Card';
|
|
|
|
import { Card, CardBody, CardHeader } from 'reactstrap';
|
2020-12-12 13:43:16 +03:00
|
|
|
import { ReactNode } from 'react';
|
2020-12-08 21:10:29 +03:00
|
|
|
|
2020-12-12 13:43:16 +03:00
|
|
|
interface SimpleCardProps extends Omit<CardProps, 'title'> {
|
|
|
|
title?: ReactNode;
|
2020-12-21 19:54:05 +03:00
|
|
|
bodyClassName?: string;
|
2020-12-08 21:10:29 +03:00
|
|
|
}
|
|
|
|
|
2020-12-21 19:54:05 +03:00
|
|
|
export const SimpleCard = ({ title, children, bodyClassName, ...rest }: SimpleCardProps) => (
|
2020-12-08 21:10:29 +03:00
|
|
|
<Card {...rest}>
|
|
|
|
{title && <CardHeader>{title}</CardHeader>}
|
2020-12-21 19:54:05 +03:00
|
|
|
<CardBody className={bodyClassName}>{children}</CardBody>
|
2020-12-08 21:10:29 +03:00
|
|
|
</Card>
|
|
|
|
);
|