Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 38 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
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 |