Passed
Push — main ( f1f3c3...623dee )
by Alejandro
39:02 queued 36:46
created

src/utils/SimpleCard.tsx

Complexity

Total Complexity 0
Complexity/F 0

Size

Lines of Code 15
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 0
eloc 12
mnd 0
bc 0
fnc 0
dl 0
loc 15
ccs 2
cts 2
cp 1
bpm 0
cpm 0
noi 0
c 0
b 0
f 0
1
import { CardProps } from 'reactstrap/lib/Card';
2
import { Card, CardBody, CardHeader } from 'reactstrap';
3
import { ReactNode } from 'react';
4
5
interface SimpleCardProps extends Omit<CardProps, 'title'> {
6
  title?: ReactNode;
7
}
8
9 8
export const SimpleCard = ({ title, children, ...rest }: SimpleCardProps) => (
10 8
  <Card {...rest}>
11
    {title && <CardHeader>{title}</CardHeader>}
12
    <CardBody>{children}</CardBody>
13
  </Card>
14
);
15