@@ -5,52 +5,61 @@ import * as CR from 'typings'
55import * as G from 'typings/graphql'
66
77const 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+ } ,
1219}
1320
1421interface Props {
15- tutorial : G . Tutorial
16- onContinue ( ) : void
17- onNew ( ) : void
22+ tutorial : G . Tutorial
23+ onContinue ( ) : void
24+ onNew ( ) : void
1825}
1926
2027export 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 >
3746)
3847
3948interface ContainerProps {
40- context : CR . MachineContext
41- send ( action : CR . Action | string ) : void
49+ context : CR . MachineContext
50+ send ( action : CR . Action | string ) : void
4251}
4352
4453const ContinuePageContainer = ( { context, send } : ContainerProps ) => {
45- const { tutorial } = context
54+ const { tutorial } = context
4655
47- if ( ! tutorial ) {
48- throw new Error ( 'Tutorial not found' )
49- }
56+ if ( ! tutorial ) {
57+ throw new Error ( 'Tutorial not found' )
58+ }
5059
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+ )
5463}
5564
5665export default ContinuePageContainer
0 commit comments