@@ -5,52 +5,61 @@ import * as CR from 'typings'
5
5
import * as G from 'typings/graphql'
6
6
7
7
const styles = {
8
- page : {
9
- position : 'relative' as 'relative' ,
10
- width : '100%' ,
11
- } ,
8
+ page : {
9
+ position : 'relative' as 'relative' ,
10
+ width : '100%' ,
11
+ } ,
12
+ header : {
13
+ height : '36px' ,
14
+ backgroundColor : '#EBEBEB' ,
15
+ fontSize : '16px' ,
16
+ lineHeight : '16px' ,
17
+ padding : '10px 1rem' ,
18
+ } ,
12
19
}
13
20
14
21
interface Props {
15
- tutorial : G . Tutorial
16
- onContinue ( ) : void
17
- onNew ( ) : void
22
+ tutorial : G . Tutorial
23
+ onContinue ( ) : void
24
+ onNew ( ) : void
18
25
}
19
26
20
27
export const ContinuePage = ( props : Props ) => (
21
- < div style = { styles . page } >
22
- < h3 > Continue</ h3 >
23
- < Card >
24
- < div >
25
- < h2 > { props . tutorial . version . summary . title } </ h2 >
26
- < p > { props . tutorial . version . summary . description } </ p >
27
- < Button onClick = { props . onContinue } > Resume</ Button >
28
- </ div >
29
- </ Card >
30
- < Card >
31
- < div >
32
- < h2 > Start a New Tutorial</ h2 >
33
- < Button onClick = { props . onNew } > Select New Tutorial</ Button >
34
- </ div >
35
- </ Card >
36
- </ div >
28
+ < div style = { styles . page } >
29
+ < div style = { styles . header } >
30
+ < span > CodeRoad</ span >
31
+ </ div >
32
+ < Card >
33
+ < div >
34
+ < h2 > { props . tutorial . version . summary . title } </ h2 >
35
+ < p > { props . tutorial . version . summary . description } </ p >
36
+ < Button onClick = { props . onContinue } > Resume</ Button >
37
+ </ div >
38
+ </ Card >
39
+ < Card >
40
+ < div >
41
+ < h2 > Start a New Tutorial</ h2 >
42
+ < Button onClick = { props . onNew } > Select New Tutorial</ Button >
43
+ </ div >
44
+ </ Card >
45
+ </ div >
37
46
)
38
47
39
48
interface ContainerProps {
40
- context : CR . MachineContext
41
- send ( action : CR . Action | string ) : void
49
+ context : CR . MachineContext
50
+ send ( action : CR . Action | string ) : void
42
51
}
43
52
44
53
const ContinuePageContainer = ( { context, send } : ContainerProps ) => {
45
- const { tutorial } = context
54
+ const { tutorial } = context
46
55
47
- if ( ! tutorial ) {
48
- throw new Error ( 'Tutorial not found' )
49
- }
56
+ if ( ! tutorial ) {
57
+ throw new Error ( 'Tutorial not found' )
58
+ }
50
59
51
- return (
52
- < ContinuePage tutorial = { tutorial } onContinue = { ( ) => send ( 'TUTORIAL_START' ) } onNew = { ( ) => send ( 'TUTORIAL_SELECT' ) } />
53
- )
60
+ return (
61
+ < ContinuePage tutorial = { tutorial } onContinue = { ( ) => send ( 'TUTORIAL_START' ) } onNew = { ( ) => send ( 'TUTORIAL_SELECT' ) } />
62
+ )
54
63
}
55
64
56
65
export default ContinuePageContainer
0 commit comments