@@ -5,7 +5,8 @@ import CardActions from '@material-ui/core/CardActions';
5
5
import CardContent from '@material-ui/core/CardContent' ;
6
6
import Button from '@material-ui/core/Button' ;
7
7
import Typography from '@material-ui/core/Typography' ;
8
- import Container from '@material-ui/core/Container' ; import { Link , withRouter , RouteComponentProps } from 'react-router-dom' ;
8
+ import Container from '@material-ui/core/Container' ;
9
+ import { Link , withRouter , RouteComponentProps } from 'react-router-dom' ;
9
10
import Styling from '../constants/Styling' ;
10
11
import MenuBookIcon from '@material-ui/icons/MenuBook' ;
11
12
import LinkIcon from '@material-ui/icons/Link' ;
@@ -24,17 +25,19 @@ const useStyles = makeStyles({
24
25
width : 350 ,
25
26
height : 300 ,
26
27
margin : 20 ,
27
- border : `1px solid ${ Styling . darkBlue } ` ,
28
+ border : `1px solid gray ` ,
28
29
backgroundColor : Styling . tutorialGray ,
29
30
color : 'white' ,
31
+ borderRadius : '5%' ,
32
+ boxShadow : '10px 10px 10px gray'
30
33
} ,
31
34
bullet : {
32
35
display : 'inline-block' ,
33
36
margin : '0 2px' ,
34
- transform : 'scale(0.8)' ,
37
+ transform : 'scale(0.8)'
35
38
} ,
36
39
title : {
37
- color : Styling . darkBlue ,
40
+ color : Styling . darkBlue ,
38
41
fontSize : 28 ,
39
42
fontWeight : 500
40
43
} ,
@@ -49,19 +52,21 @@ const useStyles = makeStyles({
49
52
pageTitle : {
50
53
fontSize : 100 ,
51
54
color : Styling . darkBlue ,
52
- boxShadow : '2px 2px ' ,
55
+ boxShadow : '10px 10px 10px #00001a ' ,
53
56
border : `1px solid ${ Styling . darkBlue } ` ,
54
57
padding : '20px' ,
55
58
backgroundColor : 'white' ,
59
+ borderRadius : '10px'
56
60
} ,
57
61
container : {
58
- display :'flex' ,
62
+ display : 'flex' ,
59
63
justifyContent : 'center' ,
60
64
flexDirection : 'column' ,
61
- alignItems : 'center'
65
+ alignItems : 'center' ,
66
+ backgroundColor : 'lightgray'
62
67
} ,
63
68
wrapper : {
64
- display :'flex' ,
69
+ display : 'flex' ,
65
70
justifyContent : 'center' ,
66
71
flexWrap : 'wrap' ,
67
72
width : '75%'
@@ -72,62 +77,77 @@ const useStyles = makeStyles({
72
77
flexBasis : '33.333333%'
73
78
} ,
74
79
cardActions : {
75
- alignSelf :'center' ,
76
- justifySelf :'center'
80
+ alignSelf : 'center' ,
81
+ justifySelf : 'center'
77
82
}
78
83
} ) ;
79
84
80
85
const Tutorial : React . FC < RouteComponentProps > = ( ) => {
81
86
const classes = useStyles ( ) ;
82
- const topics = [ 'Pages' , 'Route Links' , 'Code Preview' , 'Reusable Components' , 'Canvas' , 'Component Tree' , 'HTML Elements' , 'Styling' , 'Customization' ] ;
83
- const routes = [ '/pages' , '/links' , '/code-preview' , '/reusable-components' , '/canvas' , '/component-tree' , '/html-elements' , '/styling' , '/customization' ] ;
87
+ const topics = [
88
+ 'Pages' ,
89
+ 'Route Links' ,
90
+ 'Code Preview' ,
91
+ 'Reusable Components' ,
92
+ 'Canvas' ,
93
+ 'Component Tree' ,
94
+ 'HTML Elements' ,
95
+ 'Styling' ,
96
+ 'Customization'
97
+ ] ;
98
+ const routes = [
99
+ '/pages' ,
100
+ '/links' ,
101
+ '/code-preview' ,
102
+ '/reusable-components' ,
103
+ '/canvas' ,
104
+ '/component-tree' ,
105
+ '/html-elements' ,
106
+ '/styling' ,
107
+ '/customization'
108
+ ] ;
84
109
const icons = [
85
- < MenuBookIcon className = { classes . icons } /> ,
86
- < LinkIcon className = { classes . icons } /> ,
87
- < CodeIcon className = { classes . icons } /> ,
88
- < AddToPhotosIcon className = { classes . icons } /> ,
89
- < TvIcon className = { classes . icons } /> ,
90
- < AccountTreeIcon className = { classes . icons } /> ,
91
- < AddPhotoAlternateIcon className = { classes . icons } /> ,
92
- < StyleIcon className = { classes . icons } /> ,
93
- < ColorLensIcon className = { classes . icons } /> ,
110
+ < MenuBookIcon className = { classes . icons } /> ,
111
+ < LinkIcon className = { classes . icons } /> ,
112
+ < CodeIcon className = { classes . icons } /> ,
113
+ < AddToPhotosIcon className = { classes . icons } /> ,
114
+ < TvIcon className = { classes . icons } /> ,
115
+ < AccountTreeIcon className = { classes . icons } /> ,
116
+ < AddPhotoAlternateIcon className = { classes . icons } /> ,
117
+ < StyleIcon className = { classes . icons } /> ,
118
+ < ColorLensIcon className = { classes . icons } />
94
119
] ;
95
-
120
+
96
121
const body = document . querySelector ( 'body' ) ;
97
122
body . style . overflowY = 'auto' ;
98
- body . style . backgroundColor = Styling . tutorialGray ;
123
+ body . style . backgroundColor = 'lightgray' ;
99
124
100
125
const cards = topics . map ( ( topic , i ) => {
101
126
return (
102
- < div key = { `k${ i } ` } className = { classes . cardWrapper } >
103
- < Card className = { classes . root } variant = "elevation" >
104
- < CardContent >
105
- < Typography className = { classes . title } >
106
- { topic }
107
- </ Typography >
108
- </ CardContent >
109
- < CardActions className = { classes . cardActions } >
110
- < Link to = { routes [ i ] } style = { { textDecoration : 'none' } } >
111
- { icons [ i ] }
112
- </ Link >
113
- </ CardActions >
114
- </ Card >
115
- </ div >
116
- )
127
+ < div key = { `k${ i } ` } className = { classes . cardWrapper } >
128
+ < Card className = { classes . root } variant = "elevation" >
129
+ < CardContent >
130
+ < Typography className = { classes . title } > { topic } </ Typography >
131
+ </ CardContent >
132
+ < CardActions className = { classes . cardActions } >
133
+ < Link to = { routes [ i ] } style = { { textDecoration : 'none' } } >
134
+ { icons [ i ] }
135
+ </ Link >
136
+ </ CardActions >
137
+ </ Card >
138
+ </ div >
139
+ ) ;
117
140
} ) ;
118
141
119
142
return (
120
- < Container maxWidth = "xl" className = { classes . container } >
121
- < h1 className = { classes . pageTitle } > Reactype Tutorial</ h1 >
122
- < div className = { classes . wrapper } >
123
- { cards }
124
- </ div >
125
- { /* <Link to={`/`}>
143
+ < Container maxWidth = "xl" className = { classes . container } >
144
+ < h1 className = { classes . pageTitle } > Reactype Tutorial</ h1 >
145
+ < div className = { classes . wrapper } > { cards } </ div >
146
+ { /* <Link to={`/`}>
126
147
<button>Application</button>
127
148
</Link> */ }
128
- </ Container >
149
+ </ Container >
129
150
) ;
130
151
} ;
131
152
132
153
export default withRouter ( Tutorial ) ;
133
-
0 commit comments