Create src folder for shlink-web-component

This commit is contained in:
Alejandro Celaya
2023-08-02 08:23:48 +02:00
parent b7d57a53f2
commit c48facc863
294 changed files with 347 additions and 347 deletions

View File

@@ -0,0 +1,16 @@
import type { FC, PropsWithChildren, ReactNode } from 'react';
import { Card, CardBody, CardFooter, CardHeader } from 'reactstrap';
import './ChartCard.scss';
type ChartCardProps = PropsWithChildren<{
title: Function | string;
footer?: ReactNode;
}>;
export const ChartCard: FC<ChartCardProps> = ({ title, footer, children }) => (
<Card role="document">
<CardHeader className="chart-card__header">{typeof title === 'function' ? title() : title}</CardHeader>
<CardBody>{children}</CardBody>
{footer && <CardFooter className="chart-card__footer--sticky">{footer}</CardFooter>}
</Card>
);