Skip to content

Commit db8c1ce

Browse files
committed
chore: homogenise styling approach to input
1 parent cf4cdda commit db8c1ce

File tree

4 files changed

+41
-173
lines changed

4 files changed

+41
-173
lines changed

src/components/Authorization/Authorization.style.ts

Lines changed: 0 additions & 133 deletions
This file was deleted.

src/components/Authorization/Authorization.tsx

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { useEffect, useState } from 'react'
22
import { AbiItem } from 'web3-utils'
33
import { Contract } from 'web3-eth-contract'
44
import { isAddress } from 'web3-validator'
5-
import * as Styled from './Authorization.style'
65

76
/**
87
* Interface for managing Dapper wallet authorization details
@@ -146,46 +145,40 @@ const Authorization: React.FC<AuthorizationProps> = ({ walletAddress, contract }
146145
}
147146

148147
return (
149-
<Styled.Container>
150-
<Styled.WalletHeader>
151-
Dapper Wallet: <Styled.WalletAddress>{walletAddress}</Styled.WalletAddress>
152-
</Styled.WalletHeader>
148+
<>
149+
<h2>Dapper Wallet:</h2>
150+
<code>{walletAddress}</code>
153151

154152
{authorizationSuccess ? (
155-
<Styled.SuccessMessage>
153+
<>
156154
<h3>Success! New authorized / cosigner pair for this address is:</h3>
157-
<Styled.AuthorizedAddress>{walletDetails.newAuthorized}</Styled.AuthorizedAddress>
158-
</Styled.SuccessMessage>
155+
<code>{walletDetails.newAuthorized}</code>
156+
</>
159157
) : (
160-
<Styled.AuthorizationForm>
161-
<Styled.FormInstructions>
162-
<p>Use this form to add an Ethereum wallet as an authorized address to the Dapper wallet you're currently signed into.</p>
163-
<p>Ensure that you double-check the wallet address you've pasted to confirm it is correct.</p>
164-
<p>Once you're confident the address is correct, submit and sign the transaction.</p>
165-
</Styled.FormInstructions>
158+
<>
159+
<p>Use this form to add an Ethereum wallet as an authorized address to the Dapper wallet you're currently signed into.</p>
160+
<p>Ensure that you double-check the wallet address you've pasted to confirm it is correct.</p>
161+
<p>Once you're confident the address is correct, submit and sign the transaction.</p>
166162

167-
<Styled.InputGroup>
168-
<label htmlFor="newAuthorized">
169-
Add new authorization:
170-
<Styled.AddressInput
171-
id="newAuthorized"
172-
type="text"
173-
value={walletDetails.newAuthorized}
174-
onChange={e => handleInputChange(e, 'newAuthorized')}
175-
placeholder="Enter Ethereum address (0x...)"
176-
/>
177-
</label>
178-
</Styled.InputGroup>
163+
<label>
164+
Add new authorization:
165+
<input
166+
type="text"
167+
value={walletDetails.newAuthorized}
168+
onChange={e => handleInputChange(e, 'newAuthorized')}
169+
placeholder="Enter Ethereum address (0x...)"
170+
/>
171+
</label>
179172

180-
<Styled.SubmitButton
173+
<button
181174
onClick={handleSetAuthorized}
182175
disabled={!isAddress(walletDetails.newAuthorized)}
183176
>
184177
Set new authorized address
185-
</Styled.SubmitButton>
186-
</Styled.AuthorizationForm>
178+
</button>
179+
</>
187180
)}
188-
</Styled.Container>
181+
</>
189182
)
190183
}
191184

src/components/SetDapperWallet/SetDapperWallet.tsx

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,38 +12,46 @@ interface Props {
1212
const SetDapperWallet: React.FC<Props> = ({ walletAddress, walletDetails, handleInputChange, handleSave, isCosigner }) => {
1313
return (
1414
<>
15-
<h2>{'Signer Address:'}</h2>
15+
<h2>Signer Address:</h2>
1616
<code>{walletAddress}</code>
17+
1718
{walletDetails.dapperWallet ? (
1819
<>
1920
<h3>Dapper Wallet address:</h3>
2021
<code>{walletDetails.dapperWallet}</code>
2122
{isCosigner ? (
22-
<p><span className={'success'}></span>{'The wallet you are signed in with is authorized for the Dapper Legacy wallet you provided.'}</p>
23+
<p>
24+
<span className="success"></span>
25+
The wallet you are signed in with is authorized for the Dapper Legacy wallet you provided.
26+
</p>
2327
) : (
24-
<p className={'warning'}>{'The cosigner address is not the same as logged in wallet address'}</p>
28+
<p className="warning">
29+
The cosigner address is not the same as logged in wallet address
30+
</p>
2531
)}
2632
</>
2733
) : (
2834
<>
29-
<p>{'Add the Dapper legacy wallet you want to use:'}</p>
35+
<p>Add the Dapper legacy wallet you want to use:</p>
3036
<label>
31-
{'Set dapper wallet address:'}
37+
Set dapper wallet address:
3238
<input
3339
type="text"
3440
value={walletDetails.dapperWalletInput}
3541
onChange={e => handleInputChange(e, 'dapperWalletInput')}
42+
placeholder="Enter Dapper wallet address (0x...)"
3643
/>
3744
</label>
3845
<button
39-
type="submit"
4046
onClick={handleSave}
41-
disabled={!(isAddress(walletDetails.dapperWalletInput))}
42-
>Set Dapper Wallet</button>
47+
disabled={!isAddress(walletDetails.dapperWalletInput)}
48+
>
49+
Set Dapper Wallet
50+
</button>
4351
</>
4452
)}
4553
</>
4654
)
4755
}
4856

49-
export default SetDapperWallet
57+
export default SetDapperWallet

src/style/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,4 @@ export const Grid = styled.div`
182182
width: 100%;
183183
display: flex;
184184
flex-wrap: wrap;
185-
`
185+
`

0 commit comments

Comments
 (0)