@@ -10,6 +10,7 @@ import ReviewPage from './containers/Review'
10
10
import Button from '../../components/Button'
11
11
import ProcessMessages from '../../components/ProcessMessages'
12
12
import TestMessage from '../../components/TestMessage'
13
+ import { Progress } from '@alifd/next'
13
14
import { DISPLAY_RUN_TEST_BUTTON } from '../../environment'
14
15
15
16
const styles = {
@@ -39,16 +40,19 @@ const styles = {
39
40
backgroundColor :'black' ,
40
41
fontSize :'1rem' ,
41
42
lineHeight :'1rem' ,
42
- padding :'10px1rem ' ,
43
+ padding :'10px0rem ' ,
43
44
position :'fixed' as 'fixed' ,
44
45
bottom :0 ,
45
46
left :0 ,
46
47
right :0 ,
47
48
color :'white' ,
48
49
} ,
49
- taskCount :{
50
- fontSize :'0.8rem' ,
51
- opacity :0.9 ,
50
+ taskProgress :{
51
+ display :'flex' as 'flex' ,
52
+ justifyContent :'flex-end' as 'flex-end' ,
53
+ alignItems :'center' as 'center' ,
54
+ width :'10rem' ,
55
+ color :'white' ,
52
56
} ,
53
57
processes :{
54
58
padding :'0 1rem' ,
@@ -147,23 +151,42 @@ const TutorialPage = (props: PageProps) => {
147
151
< TestMessage message = { testStatus . title } />
148
152
</ div >
149
153
) }
150
-
154
+ { /* Left */ }
151
155
{ DISPLAY_RUN_TEST_BUTTON && levelStatus !== 'COMPLETE' ?(
152
- < Button type = "primary" onClick = { onRunTest } disabled = { processes . length > 0 } >
156
+ < Button style = { { marginLeft : '1rem' } } type = "primary" onClick = { onRunTest } disabled = { processes . length > 0 } >
153
157
Run
154
158
</ Button >
155
- ) :null }
156
- < span >
159
+ ) :(
160
+ < div />
161
+ ) }
162
+
163
+ { /* Center */ }
164
+ < div />
165
+
166
+ { /* Right */ }
167
+ < div >
157
168
{ levelStatus === 'COMPLETE' || ! level . steps . length ?(
158
169
< Button type = "primary" onClick = { onContinue } >
159
170
Continue
160
171
</ Button >
161
172
) :(
162
- < span css = { styles . taskCount } >
163
- { currentStep } of{ level . steps . length } tasks
164
- </ span >
173
+ < Progress
174
+ state = "success"
175
+ progressive
176
+ percent = { ( currentStep / level . steps . length ) * 100 }
177
+ shape = "line"
178
+ color = "rgb(85, 132, 255)"
179
+ css = { styles . taskProgress }
180
+ textRender = { ( percent :number ) => {
181
+ return (
182
+ < span style = { { color :'white' } } >
183
+ { currentStep } of{ level . steps . length }
184
+ </ span >
185
+ )
186
+ } }
187
+ />
165
188
) }
166
- </ span >
189
+ </ div >
167
190
</ div >
168
191
< SideMenu visible = { menuVisible } toggleVisible = { setMenuVisible } page = { page } setPage = { setPage } />
169
192
</ div >