-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WALL-2589/chore: poa address section (#11434)
* chore: poa address * fix: remove test launch * chore: update v2 * chore: comments and update styles for responsive * fix: remove test launch v2 * fix: comments
- Loading branch information
1 parent
8558a27
commit 3b3472f
Showing
9 changed files
with
156 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
packages/wallets/src/features/accounts/screens/ResubmitPOA/ResubmitPOA.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
.wallets-resubmit-poa { | ||
width: 99.6rem; | ||
height: 60rem; | ||
display: flex; | ||
padding: 1.6rem; | ||
flex-direction: column; | ||
align-items: center; | ||
gap: 1.6rem; | ||
flex: 1 0 0; | ||
align-self: stretch; | ||
background: var(--system-light-8-primary-background, #fff); | ||
|
||
@include mobile { | ||
width: 100%; | ||
height: 100%; | ||
padding: 1.6rem; | ||
} | ||
|
||
&__address { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
gap: 1.6rem; | ||
max-width: 85rem; | ||
|
||
@include mobile { | ||
width: 100%; | ||
} | ||
|
||
&--title { | ||
display: flex; | ||
height: 2.4rem; | ||
justify-content: center; | ||
align-items: center; | ||
gap: 1.1rem; | ||
|
||
@include mobile { | ||
display: flex; | ||
align-items: center; | ||
gap: 8px; | ||
align-self: stretch; | ||
} | ||
|
||
&-divider { | ||
width: 76rem; | ||
height: 0.12rem; | ||
flex-shrink: 0; | ||
background: var(--system-light-7-secondary-background, #f2f3f4); | ||
|
||
@include mobile { | ||
height: 0.1rem; | ||
flex: 1 0 0; | ||
} | ||
} | ||
} | ||
|
||
&--inline { | ||
display: flex; | ||
align-items: flex-start; | ||
gap: 0.8rem; | ||
|
||
&-message { | ||
width: 80rem; | ||
|
||
@include mobile { | ||
width: 100%; | ||
} | ||
} | ||
} | ||
|
||
&--input { | ||
display: flex; | ||
width: 84.2rem; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
gap: 1.6rem; | ||
|
||
@include mobile { | ||
width: 100%; | ||
} | ||
} | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
packages/wallets/src/features/accounts/screens/ResubmitPOA/ResubmitPOA.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import React, { useState } from 'react'; | ||
import { useSettings, useStatesList } from '@deriv/api'; | ||
import { InlineMessage, WalletDropdown, WalletText, WalletTextField } from '../../../../components/Base'; | ||
import useDevice from '../../../../hooks/useDevice'; | ||
import './ResubmitPOA.scss'; | ||
|
||
const ResubmitPOA: React.FC = () => { | ||
const { data } = useSettings(); | ||
const { isMobile } = useDevice(); | ||
const country = data?.country_code || ''; | ||
const { data: statesList } = useStatesList(country); | ||
|
||
const [selectedState, setSelectedState] = useState(''); | ||
|
||
// Will replace this with formik values later | ||
const handleSelect = (value: string) => { | ||
setSelectedState(value); | ||
}; | ||
|
||
const deviceWidth = isMobile ? '100%' : '84rem'; | ||
|
||
return ( | ||
<div className='wallets-resubmit-poa'> | ||
<div className='wallets-resubmit-poa__address'> | ||
<div className='wallets-resubmit-poa__address--title'> | ||
<WalletText weight='bold'>Address</WalletText> | ||
<div className='wallets-resubmit-poa__address--title-divider' /> | ||
</div> | ||
<div className='wallets-resubmit-poa__address--inline'> | ||
<InlineMessage size='md' type='warning' variant='contained'> | ||
<div className='wallets-resubmit-poa__address--inline-message'> | ||
For faster verification, input the same address here as in your proof of address document | ||
(see section below) | ||
</div> | ||
</InlineMessage> | ||
</div> | ||
<div className='wallets-resubmit-poa__address--input'> | ||
<WalletTextField label='First line of address*' maxWidth={deviceWidth} name='first-line' /> | ||
<WalletTextField label='Second line of address' maxWidth={deviceWidth} name='second-line' /> | ||
<WalletTextField label='Town/City*' maxWidth={deviceWidth} name='town-line' /> | ||
<WalletDropdown | ||
label='State/Province' | ||
list={statesList} | ||
listHeight='sm' | ||
maxWidth={deviceWidth} | ||
onSelect={handleSelect} | ||
value={selectedState} | ||
/> | ||
<WalletTextField label='Postal/ZIP Code' maxWidth={deviceWidth} name='zip-line' /> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ResubmitPOA; |
1 change: 1 addition & 0 deletions
1
packages/wallets/src/features/accounts/screens/ResubmitPOA/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as ResubmitPOA } from './ResubmitPOA'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './IDVDocumentUpload'; | ||
export * from './ManualDocumentUpload'; | ||
export * from './ResubmitPOA'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3b3472f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
deriv-app – ./
deriv-app.binary.sx
deriv-app-git-master.binary.sx
binary.sx
deriv-app.vercel.app