Skip to content

Commit 428a985

Browse files
LianaHusAniket-Engg
authored andcommitted
etherscan btns style fix
1 parent 880a3d3 commit 428a985

File tree

9 files changed

+18425
-19
lines changed

9 files changed

+18425
-19
lines changed

apps/etherscan/src/app/components/HeaderWithSettings.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ const HomeIcon: React.FC<IconProps> = ({ from }: IconProps) => {
2020
to={{
2121
pathname: "/"
2222
}}
23-
className={({ isActive }) => isActive ? "btn p-0 m-0" : "btn text-dark p-0 m-0"}
23+
className={({ isActive }) => isActive ? "border border-secondary shadow-none btn p-1 m-0" : "border-0 shadow-none btn p-1 m-0"}
24+
style={ ({ isActive }) => !isActive ? { width: "1.8rem", filter: "contrast(0.5)"} : {width: "1.8rem"}}
2425
state={ from }
2526
>
2627
<CustomTooltip
@@ -41,7 +42,8 @@ const ReceiptsIcon: React.FC<IconProps> = ({ from }: IconProps) => {
4142
to={{
4243
pathname: "/receipts"
4344
}}
44-
className={({ isActive }) => isActive ? "btn p-0 m-0 mx-2" : "btn text-dark p-0 m-0 mx-2"}
45+
className={({ isActive }) => isActive ? "border border-secondary shadow-none btn p-1 m-0" : "border-0 shadow-none btn p-1 m-0"}
46+
style={ ({ isActive }) => !isActive ? { width: "1.8rem", filter: "contrast(0.5)"} : {width: "1.8rem"}}
4547
state={ from }
4648
>
4749
<CustomTooltip
@@ -62,7 +64,8 @@ const SettingsIcon: React.FC<IconProps> = ({ from }: IconProps) => {
6264
to={{
6365
pathname: "/settings"
6466
}}
65-
className={({ isActive }) => isActive ? "btn p-0 m-0" : "btn text-dark p-0 m-0"}
67+
className={({ isActive }) => isActive ? "border border-secondary shadow-none btn p-1 m-0" : "border-0 shadow-none btn p-1 m-0"}
68+
style={ ({ isActive }) => !isActive ? { width: "1.8rem", filter: "contrast(0.5)"} : {width: "1.8rem"}}
6669
state= {from}
6770
>
6871
<CustomTooltip
@@ -85,7 +88,7 @@ export const HeaderWithSettings: React.FC<Props> = ({
8588
{() => (
8689
<div className="d-flex justify-content-between">
8790
<h6 className="d-inline">{title}</h6>
88-
<div>
91+
<div className="nav">
8992
<HomeIcon from={from} />
9093
<ReceiptsIcon from={from} />
9194
<SettingsIcon from={from} />

apps/etherscan/src/app/views/VerifyView.tsx

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export const VerifyView: React.FC<Props> = ({
119119
errors.contractAddress = "Required"
120120
}
121121
if (values.contractAddress.trim() === "" || !values.contractAddress.startsWith('0x')
122-
|| values.contractAddress.length !== 42) {
122+
|| values.contractAddress.length !== 42) {
123123
errors.contractAddress = "Please enter a valid contract address"
124124
}
125125
return errors
@@ -144,7 +144,6 @@ export const VerifyView: React.FC<Props> = ({
144144
/>
145145
</CustomTooltip>
146146
</div>
147-
148147
<div className="form-group">
149148
<label htmlFor="contractName">Contract Name</label>
150149
<Field
@@ -176,7 +175,6 @@ export const VerifyView: React.FC<Props> = ({
176175
component="div"
177176
/>
178177
</div>
179-
180178
<div className={ showConstructorArgs ? 'form-group d-block': 'form-group d-none' } >
181179
<label>Constructor Arguments</label>
182180
{constructorInputs.map((item, index) => {
@@ -208,7 +206,6 @@ export const VerifyView: React.FC<Props> = ({
208206
)}
209207

210208
</div>
211-
212209
<div className="form-group">
213210
<label htmlFor="contractAddress">Contract Address</label>
214211
<Field
@@ -236,12 +233,11 @@ export const VerifyView: React.FC<Props> = ({
236233
handleChange(e)
237234
if (e.target.checked) setIsProxyContract(true)
238235
else setIsProxyContract(false)
239-
}}
236+
}}
240237
/>
241-
<label className="form-check-label custom-control-label" htmlFor="isProxy">It's a proxy contract address</label>
242-
</div>
238+
<label className="form-check-label custom-control-label" htmlFor="isProxy">It's a proxy contract address</label>
239+
</div>
243240
</div>
244-
245241
<div className={ isProxyContract ? 'form-group d-block': 'form-group d-none' }>
246242
<label htmlFor="expectedImplAddress">Expected Implementation Address</label>
247243
<CustomTooltip
@@ -259,7 +255,6 @@ export const VerifyView: React.FC<Props> = ({
259255
<i style={{ fontSize: 'x-small' }} className={'ml-1 fal fa-info-circle align-self-center'} aria-hidden="true"></i>
260256
<label> &nbsp;Make sure contract is already verified on Etherscan</label>
261257
</div>
262-
263258
<SubmitButton dataId="verify-contract" text="Verify"
264259
isSubmitting={isSubmitting}
265260
disable={ !contracts.length ||
@@ -287,19 +282,15 @@ export const VerifyView: React.FC<Props> = ({
287282
Generate Verification Scripts
288283
</button>
289284
</CustomTooltip>
290-
</form>
291-
)
292-
}
293-
}
285+
</form>)
286+
}}
294287
</Formik>
295-
296288
<div
297289
data-id="verify-result"
298290
className={verificationResult.current['succeed'] ? "text-success mt-4 text-center" : "text-danger mt-4 text-center"}
299291
style={{fontSize: "0.8em"}}
300292
dangerouslySetInnerHTML={{ __html: results }}
301293
/>
302-
303294
{/* <div style={{ display: "block", textAlign: "center", marginTop: "1em" }}>
304295
<Link to="/receipts">View Receipts</Link>
305296
</div> */}

0 commit comments

Comments
 (0)