mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-16 12:33:48 +00:00
Create src folder for shlink-web-component
This commit is contained in:
16
shlink-web-component/src/visits/charts/ChartCard.tsx
Normal file
16
shlink-web-component/src/visits/charts/ChartCard.tsx
Normal 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>
|
||||
);
|
||||
Reference in New Issue
Block a user