@@ -112,8 +112,8 @@ const ValidationIcon = styled.div<{ $isValid?: boolean | null; $isValidating?: b
112
112
${ ( { $isValidating, $isValid } ) => {
113
113
if ( $isValidating ) {
114
114
return css `
115
- border : 2px solid # ccc ;
116
- border-top-color : # 007bff ;
115
+ border : 2px solid ${ ( { theme } ) => theme . stroke } ;
116
+ border-top-color : ${ ( { theme } ) => theme . primaryBlue } ;
117
117
animation : spin 1s linear infinite;
118
118
119
119
@keyframes spin {
@@ -126,7 +126,7 @@ const ValidationIcon = styled.div<{ $isValid?: boolean | null; $isValidating?: b
126
126
127
127
if ( $isValid === true ) {
128
128
return css `
129
- background-color : # 28a745 ;
129
+ background-color : ${ ( { theme } ) => theme . success } ;
130
130
color : white;
131
131
& ::after {
132
132
content : "✓" ;
@@ -136,7 +136,7 @@ const ValidationIcon = styled.div<{ $isValid?: boolean | null; $isValidating?: b
136
136
137
137
if ( $isValid === false ) {
138
138
return css `
139
- background-color : # dc3545 ;
139
+ background-color : ${ ( { theme } ) => theme . error } ;
140
140
color : white;
141
141
& ::after {
142
142
content : "✗" ;
@@ -151,17 +151,17 @@ const ValidationIcon = styled.div<{ $isValid?: boolean | null; $isValidating?: b
151
151
` ;
152
152
153
153
const ValidationMessage = styled . small < { $isError ?: boolean } > `
154
- color: ${ ( { $isError } ) => ( $isError ? "#dc3545" : "#28a745" ) } ;
154
+ color: ${ ( { $isError, theme } ) => ( $isError ? theme . error : theme . success ) } ;
155
155
font-size: 14px;
156
156
font-style: italic;
157
157
font-weight: normal;
158
158
` ;
159
159
160
160
const StyledFieldWithValidation = styled ( StyledField ) < { $isValid ?: boolean | null } > `
161
161
> input {
162
- border-color: ${ ( { $isValid } ) => {
163
- if ( $isValid === true ) return "#28a745" ;
164
- if ( $isValid === false ) return "#dc3545" ;
162
+ border-color: ${ ( { $isValid, theme } ) => {
163
+ if ( $isValid === true ) return theme . success ;
164
+ if ( $isValid === false ) return theme . error ;
165
165
return "inherit" ;
166
166
} } ;
167
167
}
@@ -327,7 +327,7 @@ const Court: React.FC = () => {
327
327
{ tokenGateAddress . trim ( ) !== "" && (
328
328
< ValidationContainer >
329
329
< ValidationIcon $isValidating = { isValidating } $isValid = { isValidToken } />
330
- < ValidationMessage $isError = { ! ! validationError } >
330
+ < ValidationMessage $isError = { Boolean ( validationError ) } >
331
331
{ isValidating && `Validating ${ isERC1155 ? "ERC-1155" : "ERC-20 or ERC-721" } token...` }
332
332
{ validationError && validationError }
333
333
{ isValidToken === true && `Valid ${ isERC1155 ? "ERC-1155" : "ERC-20 or ERC-721" } token` }
0 commit comments