|
1 | 1 | import React from 'react'; |
2 | | -import { Grid, Typography } from '@material-ui/core'; |
| 2 | +import { Grid, withStyles } from '@material-ui/core'; |
3 | 3 |
|
| 4 | +import PageTitle from '../../components/PageTitle'; |
4 | 5 | import Widget from '../../components/Widget'; |
| 6 | +import { Typography } from '../../components/Wrappers'; |
5 | 7 |
|
6 | | -const TypographyPage = (props) => ( |
7 | | - <Grid container spacing={32}> |
8 | | - <Grid item xs={12} md={6}> |
9 | | - <Widget title="Headings" upperTitle> |
10 | | - <Typography variant="h1" gutterBottom> |
11 | | - h1. Heading |
12 | | - </Typography> |
13 | | - <Typography variant="h2" gutterBottom> |
14 | | - h2. Heading |
15 | | - </Typography> |
16 | | - <Typography variant="h3" gutterBottom> |
17 | | - h3. Heading |
18 | | - </Typography> |
19 | | - <Typography variant="h4" gutterBottom> |
20 | | - h4. Heading |
21 | | - </Typography> |
22 | | - <Typography variant="h5" gutterBottom> |
23 | | - h5. Heading |
24 | | - </Typography> |
25 | | - <Typography variant="h6" gutterBottom> |
26 | | - h6. Heading |
27 | | - </Typography> |
28 | | - </Widget> |
| 8 | +const TypographyPage = ({ classes }) => ( |
| 9 | + <React.Fragment> |
| 10 | + <PageTitle title="Typography"/> |
| 11 | + <Grid container spacing={32}> |
| 12 | + <Grid item xs={12} md={6}> |
| 13 | + <Widget title="Headings" disableWidgetMenu> |
| 14 | + <div className={classes.dashedBorder}> |
| 15 | + <Typography variant="h1" className={classes.text}> |
| 16 | + h1. Heading |
| 17 | + </Typography> |
| 18 | + <Typography variant="h2" className={classes.text}> |
| 19 | + h2. Heading |
| 20 | + </Typography> |
| 21 | + <Typography variant="h3" className={classes.text}> |
| 22 | + h3. Heading |
| 23 | + </Typography> |
| 24 | + <Typography variant="h4" className={classes.text}> |
| 25 | + h4. Heading |
| 26 | + </Typography> |
| 27 | + <Typography variant="h5" className={classes.text}> |
| 28 | + h5. Heading |
| 29 | + </Typography> |
| 30 | + <Typography variant="h6"> |
| 31 | + h6. Heading |
| 32 | + </Typography> |
| 33 | + </div> |
| 34 | + </Widget> |
| 35 | + </Grid> |
| 36 | + <Grid item xs={12} md={6}> |
| 37 | + <Widget title="Typography Colors" disableWidgetMenu> |
| 38 | + <div className={classes.dashedBorder}> |
| 39 | + <Typography variant="h1" color="primary" className={classes.text}> |
| 40 | + h1. Heading |
| 41 | + </Typography> |
| 42 | + <Typography variant="h2" color="success" className={classes.text}> |
| 43 | + h2. Heading |
| 44 | + </Typography> |
| 45 | + <Typography variant="h3" color="secondary" className={classes.text}> |
| 46 | + h3. Heading |
| 47 | + </Typography> |
| 48 | + <Typography variant="h4" color="warning" className={classes.text}> |
| 49 | + h4. Heading |
| 50 | + </Typography> |
| 51 | + <Typography variant="h5" color="primary" colorBrightness="light" className={classes.text}> |
| 52 | + h5. Heading |
| 53 | + </Typography> |
| 54 | + <Typography variant="h6" color="info"> |
| 55 | + h6. Heading |
| 56 | + </Typography> |
| 57 | + </div> |
| 58 | + </Widget> |
| 59 | + </Grid> |
| 60 | + <Grid item xs={12} md={6}> |
| 61 | + <Widget title="Basic Text Settings" disableWidgetMenu> |
| 62 | + <div className={classes.dashedBorder}> |
| 63 | + <Typography className={classes.text}>Basic text</Typography> |
| 64 | + <Typography className={classes.text} weight="light">Basic light text</Typography> |
| 65 | + <Typography className={classes.text} weight="medium">Basic medium text</Typography> |
| 66 | + <Typography className={classes.text} weight="bold">Basic bold text</Typography> |
| 67 | + <Typography className={classes.text}>BASIC UPPERCASE TEXT</Typography> |
| 68 | + <Typography className={classes.text}>basic lowercase text</Typography> |
| 69 | + <Typography className={classes.text}>Basic Capitalized Text</Typography> |
| 70 | + <Typography><i>Basic Cursive Text</i></Typography> |
| 71 | + </div> |
| 72 | + </Widget> |
| 73 | + </Grid> |
| 74 | + <Grid item xs={12} md={6}> |
| 75 | + <Widget title="Text Size" disableWidgetMenu> |
| 76 | + <div className={classes.dashedBorder}> |
| 77 | + <Typography className={classes.text} size="sm">Heading Typography SM Font Size</Typography> |
| 78 | + <Typography className={classes.text}>Heading Typography Regular Font Size</Typography> |
| 79 | + <Typography className={classes.text} size="md">Heading Typography MD Font Size</Typography> |
| 80 | + <Typography className={classes.text} size="xl">Heading Typography XL Font Size</Typography> |
| 81 | + <Typography className={classes.text} size="xxl">Heading Typography XXL Font Size</Typography> |
| 82 | + </div> |
| 83 | + </Widget> |
| 84 | + </Grid> |
29 | 85 | </Grid> |
30 | | - <Grid item xs={12} md={6}> |
31 | | - <Widget title="Content" upperTitle> |
32 | | - <Typography variant="subtitle1" gutterBottom> |
33 | | - subtitle1. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos blanditiis tenetur |
34 | | - </Typography> |
35 | | - <Typography variant="subtitle2" gutterBottom> |
36 | | - subtitle2. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos blanditiis tenetur |
37 | | - </Typography> |
38 | | - <Typography variant="body1" gutterBottom> |
39 | | - body1. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos blanditiis tenetur |
40 | | - unde suscipit, quam beatae rerum inventore consectetur, neque doloribus, cupiditate numquam |
41 | | - dignissimos laborum fugiat deleniti? Eum quasi quidem quibusdam. |
42 | | - </Typography> |
43 | | - <Typography variant="body2" gutterBottom> |
44 | | - body2. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos blanditiis tenetur |
45 | | - unde suscipit, quam beatae rerum inventore consectetur, neque doloribus, cupiditate numquam |
46 | | - dignissimos laborum fugiat deleniti? Eum quasi quidem quibusdam. |
47 | | - </Typography> |
48 | | - <Typography variant="button" gutterBottom> |
49 | | - button text |
50 | | - </Typography> |
51 | | - <Typography variant="caption" gutterBottom> |
52 | | - caption text |
53 | | - </Typography> |
54 | | - <Typography variant="overline" gutterBottom> |
55 | | - overline text |
56 | | - </Typography> |
57 | | - </Widget> |
58 | | - </Grid> |
59 | | - <Grid item xs={12} md={6}> |
60 | | - <Widget title="Typography Colors" upperTitle> |
61 | | - <Typography variant="h4" color="error" gutterBottom> |
62 | | - Error Color |
63 | | - </Typography> |
64 | | - <Typography variant="h4" color="primary" gutterBottom> |
65 | | - Primary Color |
66 | | - </Typography> |
67 | | - <Typography variant="h4" color="secondary" gutterBottom> |
68 | | - Secondary Color |
69 | | - </Typography> |
70 | | - <Typography variant="h4" color="textPrimary" gutterBottom> |
71 | | - TextPrimary Color |
72 | | - </Typography> |
73 | | - <Typography variant="h4" color="textSecondary" gutterBottom> |
74 | | - TextSecondary Color |
75 | | - </Typography> |
76 | | - </Widget> |
77 | | - </Grid> |
78 | | - </Grid> |
| 86 | + </React.Fragment> |
79 | 87 | ); |
80 | 88 |
|
| 89 | +const styles = theme => ({ |
| 90 | + dashedBorder: { |
| 91 | + border: '1px dashed', |
| 92 | + borderColor: theme.palette.primary.main, |
| 93 | + padding: theme.spacing.unit * 2, |
| 94 | + paddingTop: theme.spacing.unit * 4, |
| 95 | + paddingBottom: theme.spacing.unit * 4, |
| 96 | + marginTop: theme.spacing.unit, |
| 97 | + }, |
| 98 | + text: { |
| 99 | + marginBottom: theme.spacing.unit * 2, |
| 100 | + }, |
| 101 | +}) |
81 | 102 |
|
82 | | - |
83 | | -export default TypographyPage; |
| 103 | +export default withStyles(styles)(TypographyPage); |
0 commit comments