Test Failed
Push — master ( 41e89b...cfe199 )
by ANTHONIUS
04:45 queued 12s
created

ui/web/src/ProTip.tsx   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 38
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 28
c 0
b 0
f 0
dl 0
loc 38
rs 10
wmc 2
mnd 0
bc 0
fnc 2
bpm 0
cpm 1
noi 0

2 Functions

Rating   Name   Duplication   Size   Complexity  
A ProTip.tsx ➔ LightBulbIcon 0 6 1
A ProTip.tsx ➔ ProTip 0 10 1
1
import React from 'react';
2
import { createStyles, makeStyles, Theme } from '@material-ui/core/styles';
3
import Link from '@material-ui/core/Link';
4
import SvgIcon, { SvgIconProps } from '@material-ui/core/SvgIcon';
5
import Typography from '@material-ui/core/Typography';
6
7
function LightBulbIcon(props: SvgIconProps) {
8
  return (
9
    <SvgIcon {...props}>
10
      <path d="M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7zm2.85 11.1l-.85.6V16h-4v-2.3l-.85-.6C7.8 12.16 7 10.63 7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 1.63-.8 3.16-2.15 4.1z" />
11
    </SvgIcon>
12
  );
13
}
14
15
const useStyles = makeStyles((theme: Theme) =>
16
  createStyles({
17
    root: {
18
      margin: theme.spacing(6, 0, 3),
19
    },
20
    lightBulb: {
21
      verticalAlign: 'middle',
22
      marginRight: theme.spacing(1),
23
    },
24
  }),
25
);
26
27
export default function ProTip() {
28
  const classes = useStyles();
29
  return (
30
    <Typography className={classes.root} color="textSecondary">
31
      <LightBulbIcon className={classes.lightBulb} />
32
      Pro tip: See more{' '}
33
      <Link href="https://material-ui.com/getting-started/templates/">templates</Link> on the
34
      Material-UI documentation.
35
    </Typography>
36
  );
37
}
38