-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve wallet control in settings (#325)
* feat: add lock and new wallet controls
- Loading branch information
Daniel
committed
Jun 15, 2022
1 parent
f5e8227
commit 9d00212
Showing
8 changed files
with
222 additions
and
71 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React from 'react' | ||
import * as rb from 'react-bootstrap' | ||
import { useTranslation } from 'react-i18next' | ||
import styles from './Modal.module.css' | ||
import Sprite from './Sprite' | ||
|
||
const ConfirmModal = ({ isShown, title, body, onCancel, onConfirm }) => { | ||
const { t } = useTranslation() | ||
|
||
return ( | ||
<rb.Modal | ||
show={isShown} | ||
keyboard={true} | ||
onEscapeKeyDown={onCancel} | ||
centered={true} | ||
animation={true} | ||
backdrop="static" | ||
className={styles['modal']} | ||
> | ||
<rb.Modal.Header className={styles['modal-header']}> | ||
<rb.Modal.Title className={styles['modal-title']}>{title}</rb.Modal.Title> | ||
</rb.Modal.Header> | ||
<rb.Modal.Body className={styles['modal-body']}>{body}</rb.Modal.Body> | ||
<rb.Modal.Footer className={styles['modal-footer']}> | ||
<rb.Button | ||
variant="outline-dark" | ||
onClick={onCancel} | ||
className="d-flex justify-content-center align-items-center" | ||
> | ||
<Sprite symbol="cancel" width="26" height="26" /> | ||
<div>{t('modal.confirm_button_reject')}</div> | ||
</rb.Button> | ||
<rb.Button variant="outline-dark" onClick={onConfirm}> | ||
{t('modal.confirm_button_accept')} | ||
</rb.Button> | ||
</rb.Modal.Footer> | ||
</rb.Modal> | ||
) | ||
} | ||
|
||
export { ConfirmModal } |
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,45 @@ | ||
:global .modal-backdrop { | ||
background-color: rgba(0, 0, 0, 0.5) !important; | ||
} | ||
|
||
.modal :global .modal-content { | ||
background-color: var(--bs-body-bg) !important; | ||
border-radius: 1rem !important; | ||
box-shadow: 0px 0px 24px rgba(0, 0, 0, 0.25) !important; | ||
} | ||
|
||
.modal-header { | ||
display: flex !important; | ||
justify-content: center !important; | ||
background-color: transparent !important; | ||
border: none !important; | ||
padding: 1.25rem 1.25rem 0 1.25rem !important; | ||
} | ||
|
||
.modal-title { | ||
font-size: 1.3rem !important; | ||
font-weight: 600 !important; | ||
color: var(--bs-body-color) !important; | ||
} | ||
|
||
.modal-body { | ||
text-align: center !important; | ||
font-size: 1rem !important; | ||
font-weight: 400 !important; | ||
padding: 0.25rem 1.25rem 1rem 1.25rem !important; | ||
} | ||
|
||
.modal-footer { | ||
display: flex !important; | ||
justify-content: center !important; | ||
gap: 1rem; | ||
background-color: transparent !important; | ||
padding: 1rem 1.25rem 1.25rem 1.25rem !important; | ||
} | ||
|
||
.modal-footer :global .btn { | ||
flex-grow: 1; | ||
min-height: 2.8rem; | ||
font-weight: 500; | ||
border-color: rgba(222, 222, 222, 1); | ||
} |
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
Oops, something went wrong.