@@ -4,11 +4,12 @@ import { ArrowLeftOutlined, ArrowRightOutlined } from "@ant-design/icons";
4
4
import styled from "styled-components" ;
5
5
import { ArrowUpRight } from 'react-feather' ;
6
6
7
- import { StepType } from 'types/types' ;
7
+ import { ChainType , StepType } from 'types/types' ;
8
8
9
9
const { Text } = Typography ;
10
10
11
11
const Step = ( {
12
+ chain,
12
13
step,
13
14
isFirstStep,
14
15
isLastStep,
@@ -17,6 +18,7 @@ const Step = ({
17
18
body,
18
19
nav,
19
20
} : {
21
+ chain : ChainType
20
22
step : StepType
21
23
isFirstStep : boolean
22
24
isLastStep : boolean
@@ -48,7 +50,14 @@ const Step = ({
48
50
{ body }
49
51
</ StepContent >
50
52
51
- < StepButtons next = { next } prev = { prev } isFirstStep = { isFirstStep } isLastStep = { isLastStep } />
53
+ < StepButtons
54
+ key = { step . id }
55
+ chainId = { chain . id }
56
+ next = { next }
57
+ prev = { prev }
58
+ isFirstStep = { isFirstStep }
59
+ isLastStep = { isLastStep }
60
+ />
52
61
53
62
{ nav }
54
63
</ Col >
@@ -57,11 +66,13 @@ const Step = ({
57
66
}
58
67
59
68
const StepButtons = ( {
69
+ chainId,
60
70
next,
61
71
prev,
62
72
isFirstStep,
63
73
isLastStep,
64
74
} : {
75
+ chainId : string
65
76
next ( ) : void
66
77
prev ( ) : void
67
78
isFirstStep : boolean
@@ -75,7 +86,7 @@ const StepButtons = ({
75
86
</ PrevButton >
76
87
}
77
88
{ ! isLastStep &&
78
- < NextButton type = "primary" onClick = { ( ) => next ( ) } >
89
+ < NextButton type = "primary" onClick = { ( ) => next ( ) } textColor = { getButtonTextColor ( chainId ) } bgColor = { getButtonBgColor ( chainId ) } >
79
90
< Row align = "middle" >
80
91
Next Step
81
92
< ArrowRightOutlined size = { 20 } style = { { marginLeft : "6px" } } />
@@ -86,6 +97,28 @@ const StepButtons = ({
86
97
)
87
98
}
88
99
100
+ const getButtonBgColor = ( chainId : string ) => {
101
+ if ( chainId === "solana" ) {
102
+ return 'linear-gradient(253deg, #00FFA3, #DC1FFF)' ;
103
+ } else if ( chainId === "avalanche" ) {
104
+ return '#e84141' ;
105
+ } else if ( chainId === "polygon" ) {
106
+ return '#8247e5' ;
107
+ } else if ( chainId === "polkadot" ) {
108
+ return '#e6007a' ;
109
+ } else if ( chainId === "tezos" ) {
110
+ return '#0f62ff' ;
111
+ }
112
+ return "rgb(255,242,155)"
113
+ }
114
+
115
+ const getButtonTextColor = ( chainId : string ) => {
116
+ if ( chainId === "solana" ) {
117
+ return "white" ;
118
+ }
119
+ return "white"
120
+ }
121
+
89
122
const Right = styled ( Col ) `
90
123
padding: 60px;
91
124
height: 100vh;
@@ -118,21 +151,23 @@ const StepContent = styled.div`
118
151
margin-bottom: 100px;
119
152
` ;
120
153
121
- const NextButton = styled ( Button ) `
122
- background: rgb(255,242,155);
123
- border: solid #888 1px;
124
- color: #555;
154
+ const NextButton = styled ( Button ) < { bgColor : string ; textColor : string } > `
155
+ border: none;
156
+
157
+ color: ${ ( { textColor } ) => textColor } ;
158
+ background: ${ ( { bgColor } ) => bgColor } ;
125
159
126
160
&:hover {
127
- background: rgb(255,242,155);
128
- color: black;
129
- border: solid black 1px;
161
+ background: ${ ( { bgColor } ) => bgColor } ;
162
+ color: ${ ( { textColor } ) => textColor } ;
163
+ border: none;
164
+ box-shadow: black 2px 2px 1px;
130
165
}
131
166
` ;
132
167
133
168
const PrevButton = styled ( Button ) `
134
169
background: white;
135
- border: solid #888 1px;
170
+ border: solid #BBB 1px;
136
171
color: #555;
137
172
138
173
&:hover {
0 commit comments