11import * as React from 'react'
22import { css , jsx } from '@emotion/core'
3- import { Icon } from '@alifd/next'
3+ import { Button , Icon } from '@alifd/next'
44
55const styles = {
66 banner : {
77 height : 'auto' ,
88 width : '100%' ,
99 backgroundColor : 'rgb(85, 132, 255)' ,
1010 color : 'white' ,
11- padding : '0.5rem' ,
11+ padding : '0.5rem 1rem ' ,
1212 } ,
1313 header : {
1414 position : 'relative' as 'relative' ,
@@ -26,32 +26,53 @@ const styles = {
2626 section : {
2727 padding : '0rem 0.5rem 1rem 0.5rem' ,
2828 } ,
29+ options : {
30+ display : 'flex' as 'flex' ,
31+ flexDirection : 'row' as 'row' ,
32+ flexWrap : 'wrap' as 'wrap' ,
33+ } ,
34+ optionsLeft : {
35+ flex : 3 ,
36+ } ,
37+ optionsRight : {
38+ flex : 1 ,
39+ display : 'flex' as 'flex' ,
40+ justifyContent : 'flex-end' as 'flex-end' ,
41+ alignItems : 'flex-end' as 'flex-end' ,
42+ } ,
2943}
3044
3145interface Props {
3246 title : string
47+ onRequestWorkspace ( ) : void
3348}
3449
3550const CompletedBanner = ( props : Props ) => {
3651 return (
3752 < div css = { styles . banner } >
3853 < div css = { styles . header } >
39- { /* <div css={styles.close} onClick={() => setOpen(false)}>
40- <Icon type="close" size="xs" />
41- </div> */ }
4254 < h3 >
4355 < Icon type = "success-filling" size = "large" />
4456 < span css = { styles . headerMessage } > Congratulations on completing "{ props . title } "!</ span >
4557 </ h3 >
4658 </ div >
4759 < div css = { styles . section } >
4860 < h5 > You've reached the end of the road...</ h5 >
49- < p > To go down another path:</ p >
50- < ul >
51- < li > - open a new VSCode workspace</ li >
52- < li > - relaunch the CodeRoad app</ li >
53- < li > - select a new tutorial</ li >
54- </ ul >
61+ < div css = { styles . options } >
62+ < div css = { styles . optionsLeft } >
63+ < p > To go down another path:</ p >
64+ < ul >
65+ < li > - open a new VSCode workspace</ li >
66+ < li > - relaunch the CodeRoad app</ li >
67+ < li > - select a new tutorial</ li >
68+ </ ul >
69+ </ div >
70+ < div css = { styles . optionsRight } >
71+ < Button type = "primary" ghost = "dark" onClick = { props . onRequestWorkspace } >
72+ Open New Workspace
73+ </ Button >
74+ </ div >
75+ </ div >
5576 </ div >
5677 </ div >
5778 )
0 commit comments