File tree 4 files changed +21
-42
lines changed
packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy
4 files changed +21
-42
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " thirdweb " : patch
3
+ ---
4
+
5
+ UI cleanup for multistep swaps in PayEmbed
Original file line number Diff line number Diff line change @@ -90,9 +90,6 @@ export function OnRampScreen(props: {
90
90
isAutoMode,
91
91
} ) ;
92
92
const firstStepChainId = state . steps [ 0 ] ?. step . token . chainId ;
93
- const currentStepIndex = state . steps . findIndex (
94
- ( step ) => step . status === "pending" || step . status === "actionRequired" ,
95
- ) ;
96
93
return (
97
94
< Container p = "lg" >
98
95
< ModalHeader title = { props . title } onBack = { props . onBack } />
@@ -131,9 +128,7 @@ export function OnRampScreen(props: {
131
128
index = { index }
132
129
/>
133
130
</ StepContainer >
134
- { index < state . steps . length - 1 && (
135
- < StepConnectorArrow active = { index === currentStepIndex } />
136
- ) }
131
+ { index < state . steps . length - 1 && < StepConnectorArrow /> }
137
132
</ Container >
138
133
) ) }
139
134
</ Container >
Original file line number Diff line number Diff line change
1
+ import { ChevronDownIcon } from "@radix-ui/react-icons" ;
1
2
import { useCustomTheme } from "../../../../../../core/design-system/CustomThemeProvider.js" ;
2
3
import { Container } from "../../../../components/basic.js" ;
3
4
4
- export function StepConnectorArrow ( props : {
5
- active : boolean ;
6
- } ) {
5
+ export function StepConnectorArrow ( ) {
7
6
const theme = useCustomTheme ( ) ;
8
7
return (
9
8
< Container
10
9
flex = "row"
11
10
center = "both"
12
11
style = { {
13
12
width : "100%" ,
14
- height : "12px" ,
15
13
position : "relative" ,
16
- marginTop : "-1px" ,
14
+ marginTop : "-10px" ,
15
+ marginBottom : "-10px" ,
17
16
zIndex : 1000 ,
18
17
} }
19
18
>
20
- < svg
21
- role = "presentation"
22
- width = "32"
23
- height = "16"
24
- viewBox = "0 0 32 16"
25
- fill = "none"
19
+ < Container
20
+ flex = "row"
21
+ center = "both"
26
22
style = { {
27
- display : "block" ,
23
+ borderRadius : "100%" ,
24
+ width : "30px" ,
25
+ height : "30px" ,
26
+ backgroundColor : theme . colors . modalBg ,
27
+ border : `1px solid ${ theme . colors . borderColor } ` ,
28
28
} }
29
29
>
30
- < path
31
- d = "M1 0L16 15L31 0"
32
- fill = { theme . colors . tertiaryBg }
33
- stroke = {
34
- props . active ? theme . colors . accentText : theme . colors . borderColor
35
- }
36
- strokeWidth = "1"
37
- strokeLinecap = "square"
38
- strokeLinejoin = "miter"
39
- />
40
- < path
41
- d = "M8 0L16 7.5L24 0"
42
- fill = "none"
43
- stroke = {
44
- props . active
45
- ? theme . colors . accentText
46
- : theme . colors . secondaryIconColor
47
- }
48
- strokeWidth = "1"
49
- strokeLinecap = "square"
50
- strokeLinejoin = "miter"
51
- />
52
- </ svg >
30
+ < ChevronDownIcon width = { 16 } height = { 16 } />
31
+ </ Container >
53
32
</ Container >
54
33
) ;
55
34
}
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ export function SwapSummary(props: {
64
64
/>
65
65
</ Container >
66
66
{ /* Connector Icon */ }
67
- < StepConnectorArrow active = { false } />
67
+ < StepConnectorArrow />
68
68
{ /* Buy */ }
69
69
< Container
70
70
flex = "column"
You can’t perform that action at this time.
0 commit comments