forked from deriv-com/deriv-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Thisyahlen/mt5 password modal (deriv-com#10211)
* feat: added close icon and onclickoutside handler for modal * chore: updated code based on comments * chore: fix error * chore: add mt5 password modal to buttons * chore: add mt5 password modal to buttons * chore: update master --------- Co-authored-by: adrienne-rio <[email protected]>
- Loading branch information
1 parent
057c6e0
commit 1646a2f
Showing
5 changed files
with
162 additions
and
2 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
108 changes: 108 additions & 0 deletions
108
packages/wallets/src/components/MT5EnterPassword/MT5EnterPassword.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,108 @@ | ||
.wallets-enter-password { | ||
display: inline-flex; | ||
padding: 20px 0px 24px; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: flex-start; | ||
border-radius: 8px; | ||
background: var(--system-light-8-primary-background, #fff); | ||
box-shadow: 0px 0px 24px 0px rgba(0, 0, 0, 0.25); | ||
|
||
&--container { | ||
display: flex; | ||
width: 400px; | ||
padding: 0 24px 24px; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
gap: 8px; | ||
} | ||
|
||
&-title { | ||
display: flex; | ||
width: 400px; | ||
align-items: center; | ||
padding-bottom: 24px; | ||
gap: 8px; | ||
color: var(--system-light-1-prominent-text, #333); | ||
|
||
/* desktop/paragraph/P1 - bold */ | ||
font-family: 'IBM Plex Sans'; | ||
font-size: 16px; | ||
font-style: normal; | ||
font-weight: 700; | ||
line-height: 24px; /* 150% */ | ||
} | ||
|
||
&-subtitle { | ||
font-size: 14px; | ||
color: #333333; | ||
line-height: 20px; | ||
} | ||
|
||
&-input { | ||
position: relative; | ||
width: 100%; | ||
|
||
& > input { | ||
font-size: 14px; | ||
padding: 1rem; | ||
border: 1px solid #d6dadb; | ||
border-bottom: 5px solid #e6e9e9; | ||
border-radius: 5px; | ||
margin-bottom: 20px; | ||
outline: none; | ||
width: 100%; | ||
|
||
&::placeholder { | ||
color: #999999; | ||
} | ||
} | ||
|
||
&-trailing-icon { | ||
position: absolute; | ||
right: 20px; | ||
top: 20%; | ||
transform: scale(1.2); | ||
} | ||
} | ||
|
||
&-buttons { | ||
display: flex; | ||
width: 400px; | ||
padding-right: 24px; | ||
justify-content: flex-end; | ||
align-items: center; | ||
gap: 8px; | ||
} | ||
|
||
&-forgot-password-button { | ||
display: flex; | ||
height: 40px; | ||
padding: 10px 16px; | ||
justify-content: center; | ||
align-items: center; | ||
border-radius: 4px; | ||
background: var(--system-light-8-primary-background, #fff); | ||
font-weight: 700; | ||
cursor: pointer; | ||
border: 2px solid var(--system-light-3-less-prominent-text, #999); | ||
} | ||
|
||
&-add-button { | ||
display: flex; | ||
height: 40px; | ||
padding: 10px 16px; | ||
justify-content: center; | ||
align-items: center; | ||
border-radius: 4px; | ||
background: #ff444f; | ||
border: none; | ||
color: #ffffff; | ||
font-weight: 700; | ||
cursor: pointer; | ||
|
||
&--disabled { | ||
opacity: 0.32; | ||
} | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
packages/wallets/src/components/MT5EnterPassword/MT5EnterPassword.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,34 @@ | ||
import React from 'react'; | ||
import PasswordShowIcon from '../../public/images/ic-password-show.svg'; | ||
import { useModal } from '../ModalProvider'; | ||
import { WalletModal } from '../WalletModal'; | ||
import './MT5EnterPassword.scss'; | ||
|
||
type TProps = { | ||
name?: string; | ||
}; | ||
|
||
const MT5EnterPassword: React.FC<TProps> = ({ name }) => { | ||
const { hide } = useModal(); | ||
|
||
return ( | ||
<WalletModal className='wallets-enter-password' has_close_icon onClickCloseIcon={hide}> | ||
<div className='wallets-enter-password--container'> | ||
<div className='wallets-enter-password-title'>Enter your Deriv MT5 password</div> | ||
<span className='wallets-enter-password-subtitle'> | ||
Enter your Deriv MT5 password to add a Deriv MT5 {name} account. | ||
</span> | ||
<div className='wallets-enter-password-input'> | ||
<input placeholder='Deriv MT5 password' type='password' /> | ||
<PasswordShowIcon className='wallets-create-password-input-trailing-icon' /> | ||
</div> | ||
</div> | ||
<div className='wallets-enter-password-buttons'> | ||
<button className='wallets-enter-password-forgot-password-button'>Forgot password?</button> | ||
<button className='wallets-enter-password-add-button'>Add account</button> | ||
</div> | ||
</WalletModal> | ||
); | ||
}; | ||
|
||
export default MT5EnterPassword; |
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 MT5EnterPassword } from './MT5EnterPassword'; |
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