1
1
import React , { useCallback } from 'react' ;
2
- import { Container , Typography , Radio , Button , Box , Card , CardActionArea , CardContent } from '@material-ui/core' ;
2
+ import { Container , Typography , Box , Card , CardActionArea , CardContent } from '@material-ui/core' ;
3
3
import { Product } from '../common/types' ;
4
+ import { VSCodeRadio , VSCodeButton } from '@vscode/webview-ui-toolkit/react' ;
5
+ import { BitbucketOnboardingLogo } from '../icons/BitbucketOnboardingLogo' ;
6
+ import { JiraOnboardingLogo } from '../icons/JiraOnboardingLogo' ;
4
7
5
8
type Props = {
6
9
product : Product ;
@@ -36,7 +39,7 @@ const OnboardingRadio = ({
36
39
} }
37
40
>
38
41
< CardContent style = { formControlStyles } >
39
- < Radio size = "small" checked = { checked === value } />
42
+ < VSCodeRadio checked = { checked === value } />
40
43
< Box flexDirection = { 'column' } >
41
44
< Typography style = { { fontWeight : 'bold' } } > { title } </ Typography >
42
45
{ description && < Typography > { description } </ Typography > }
@@ -56,7 +59,7 @@ export const JiraBitbucketOnboarding: React.FC<Props> = ({
56
59
signInText,
57
60
valueSet,
58
61
} ) => {
59
- const [ checked , setChecked ] = React . useState ( '' ) ;
62
+ const [ checked , setChecked ] = React . useState ( valueSet . cloud ) ;
60
63
61
64
const handleValueChange = useCallback (
62
65
( value : string ) => {
@@ -67,11 +70,10 @@ export const JiraBitbucketOnboarding: React.FC<Props> = ({
67
70
) ;
68
71
69
72
return (
70
- < Container maxWidth = "xs" >
73
+ < Container style = { { justifyContent : 'center' } } maxWidth = "xs" >
71
74
< Box style = { wrapperStyles } flexDirection = "column" >
72
- < Typography style = { { fontWeight : 'bold' } } variant = "h2" >
73
- What version of { product } do you use?
74
- </ Typography >
75
+ { product === 'Jira' ? < JiraOnboardingLogo /> : < BitbucketOnboardingLogo /> }
76
+ < Typography variant = "h2" > What version of { product } do you use?</ Typography >
75
77
< Box flexDirection = "column" style = { radioGroupStyles } >
76
78
< OnboardingRadio
77
79
checked = { checked }
@@ -102,25 +104,23 @@ export const JiraBitbucketOnboarding: React.FC<Props> = ({
102
104
alignSelf : 'stretch' ,
103
105
} }
104
106
>
105
- < Button
107
+ < VSCodeButton
106
108
disabled = { ! handleBack }
107
109
onClick = { ( ) => {
108
110
handleBack && handleBack ( ) ;
109
111
} }
110
- size = "small "
112
+ appearance = "secondary "
111
113
>
112
114
Back
113
- </ Button >
114
- < Button
115
- size = "small"
116
- variant = "contained"
115
+ </ VSCodeButton >
116
+ < VSCodeButton
117
117
onClick = { ( ) => {
118
118
executeSetup ( ) ;
119
119
handleNext ( ) ;
120
120
} }
121
121
>
122
122
{ signInText }
123
- </ Button >
123
+ </ VSCodeButton >
124
124
</ Box >
125
125
</ Box >
126
126
</ Container >
@@ -141,8 +141,6 @@ const formControlStyles = {
141
141
gap : '8px' ,
142
142
alignSelf : 'stretch' ,
143
143
borderRadius : '4px' ,
144
- border : '1px solid token(color.border)' ,
145
- backgroundColor : 'token(color.background)' ,
146
144
} ;
147
145
148
146
const radioGroupStyles = {
0 commit comments