@@ -9,10 +9,13 @@ import ProcessEvents from '../../../components/ProcessEvents'
99
1010const styles = {
1111 page : {
12+ backgroundColor : 'white' ,
1213 position : 'relative' as 'relative' ,
1314 display : 'flex' as 'flex' ,
1415 flexDirection : 'column' as 'column' ,
1516 padding : 0 ,
17+ paddingBottom : '36px' ,
18+ height : 'auto' ,
1619 width : '100%' ,
1720 } ,
1821 header : {
@@ -26,9 +29,6 @@ const styles = {
2629 padding : '0rem 1rem' ,
2730 paddingBottom : '1rem' ,
2831 } ,
29- options : {
30- padding : '0rem 1rem' ,
31- } ,
3232 tasks : {
3333 paddingBottom : '5rem' ,
3434 } ,
@@ -46,15 +46,20 @@ const styles = {
4646 bottom : '36px' ,
4747 } ,
4848 footer : {
49+ display : 'flex' as 'flex' ,
50+ flexDirection : 'row' as 'row' ,
51+ justifyContent : 'space-between' ,
52+ alignItems : 'center' ,
4953 height : '36px' ,
5054 backgroundColor : 'black' ,
5155 fontSize : '16px' ,
5256 lineHeight : '16px' ,
5357 padding : '10px 1rem' ,
54- position : 'absolute ' as 'absolute ' ,
58+ position : 'fixed ' as 'fixed ' ,
5559 bottom : 0 ,
60+ left : 0 ,
61+ right : 0 ,
5662 color : 'white' ,
57- width : '100%' ,
5863 } ,
5964}
6065
@@ -72,14 +77,12 @@ const Level = ({ level, onContinue, onLoadSolution, processes }: Props) => {
7277
7378 return (
7479 < div style = { styles . page } >
75- < div >
76- < div style = { styles . header } >
77- < span > Learn</ span >
78- </ div >
79- < div style = { styles . content } >
80- < h2 style = { styles . title } > { level . title } </ h2 >
81- < Markdown > { level . content || '' } </ Markdown >
82- </ div >
80+ < div style = { styles . header } >
81+ < span > Learn</ span >
82+ </ div >
83+ < div style = { styles . content } >
84+ < h2 style = { styles . title } > { level . title } </ h2 >
85+ < Markdown > { level . content || '' } </ Markdown >
8386 </ div >
8487
8588 < div style = { styles . tasks } >
@@ -102,27 +105,24 @@ const Level = ({ level, onContinue, onLoadSolution, processes }: Props) => {
102105 </ div >
103106 </ div >
104107
105- < div >
106- { level . status === 'COMPLETE' && (
107- < div style = { styles . options } >
108- < Button onClick = { onContinue } > Continue</ Button >
109- </ div >
110- ) }
111-
112- { processes . length > 0 && (
113- < div style = { styles . processes } >
114- < ProcessEvents processes = { processes } />
115- </ div >
116- ) }
117-
118- < div >
119- < div style = { styles . footer } >
120- < span >
121- { typeof level . index === 'number' ? `${ level . index + 1 } . ` : '' }
122- { level . title }
123- </ span >
124- </ div >
108+ { processes . length > 0 && (
109+ < div style = { styles . processes } >
110+ < ProcessEvents processes = { processes } />
125111 </ div >
112+ ) }
113+
114+ < div style = { styles . footer } >
115+ < span >
116+ { typeof level . index === 'number' ? `${ level . index + 1 } . ` : '' }
117+ { level . title }
118+ </ span >
119+ < span >
120+ { level . status === 'COMPLETE' && (
121+ < Button type = "primary" onClick = { onContinue } >
122+ Continue
123+ </ Button >
124+ ) }
125+ </ span >
126126 </ div >
127127 </ div >
128128 )
0 commit comments