File tree Expand file tree Collapse file tree 4 files changed +21
-42
lines changed
packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy Expand file tree Collapse file tree 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: {
9090 isAutoMode,
9191 } ) ;
9292 const firstStepChainId = state . steps [ 0 ] ?. step . token . chainId ;
93- const currentStepIndex = state . steps . findIndex (
94- ( step ) => step . status === "pending" || step . status === "actionRequired" ,
95- ) ;
9693 return (
9794 < Container p = "lg" >
9895 < ModalHeader title = { props . title } onBack = { props . onBack } />
@@ -131,9 +128,7 @@ export function OnRampScreen(props: {
131128 index = { index }
132129 />
133130 </ StepContainer >
134- { index < state . steps . length - 1 && (
135- < StepConnectorArrow active = { index === currentStepIndex } />
136- ) }
131+ { index < state . steps . length - 1 && < StepConnectorArrow /> }
137132 </ Container >
138133 ) ) }
139134 </ Container >
Original file line number Diff line number Diff line change 1+ import { ChevronDownIcon } from "@radix-ui/react-icons" ;
12import { useCustomTheme } from "../../../../../../core/design-system/CustomThemeProvider.js" ;
23import { Container } from "../../../../components/basic.js" ;
34
4- export function StepConnectorArrow ( props : {
5- active : boolean ;
6- } ) {
5+ export function StepConnectorArrow ( ) {
76 const theme = useCustomTheme ( ) ;
87 return (
98 < Container
109 flex = "row"
1110 center = "both"
1211 style = { {
1312 width : "100%" ,
14- height : "12px" ,
1513 position : "relative" ,
16- marginTop : "-1px" ,
14+ marginTop : "-10px" ,
15+ marginBottom : "-10px" ,
1716 zIndex : 1000 ,
1817 } }
1918 >
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"
2622 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 } ` ,
2828 } }
2929 >
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 >
5332 </ Container >
5433 ) ;
5534}
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ export function SwapSummary(props: {
6464 />
6565 </ Container >
6666 { /* Connector Icon */ }
67- < StepConnectorArrow active = { false } />
67+ < StepConnectorArrow />
6868 { /* Buy */ }
6969 < Container
7070 flex = "column"
You can’t perform that action at this time.
0 commit comments