mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-05-31 01:26:16 +00:00
16 lines
505 B
TypeScript
16 lines
505 B
TypeScript
import type { ReactNode } from 'react';
|
|
import type { CardProps } from 'reactstrap';
|
|
import { Card, CardBody, CardHeader } from 'reactstrap';
|
|
|
|
interface SimpleCardProps extends Omit<CardProps, 'title'> {
|
|
title?: ReactNode;
|
|
bodyClassName?: string;
|
|
}
|
|
|
|
export const SimpleCard = ({ title, children, bodyClassName, ...rest }: SimpleCardProps) => (
|
|
<Card {...rest}>
|
|
{title && <CardHeader role="heading">{title}</CardHeader>}
|
|
<CardBody className={bodyClassName}>{children}</CardBody>
|
|
</Card>
|
|
);
|