diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-05-31 07:17:40 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@users.noreply.github.com> | 2018-06-01 01:37:52 +0800 |
commit | cc73d869fed79c63261821fb7ad8f1e5180ffca2 (patch) | |
tree | cb4eb988a13843fa2c01a7fee0ca594bdc98e75f /ui/app/components/modals/modal.js | |
parent | f4d833cb09758beb62a65ad4011d16bdb81b33ff (diff) | |
download | tangerine-wallet-browser-cc73d869fed79c63261821fb7ad8f1e5180ffca2.tar tangerine-wallet-browser-cc73d869fed79c63261821fb7ad8f1e5180ffca2.tar.gz tangerine-wallet-browser-cc73d869fed79c63261821fb7ad8f1e5180ffca2.tar.bz2 tangerine-wallet-browser-cc73d869fed79c63261821fb7ad8f1e5180ffca2.tar.lz tangerine-wallet-browser-cc73d869fed79c63261821fb7ad8f1e5180ffca2.tar.xz tangerine-wallet-browser-cc73d869fed79c63261821fb7ad8f1e5180ffca2.tar.zst tangerine-wallet-browser-cc73d869fed79c63261821fb7ad8f1e5180ffca2.zip |
Add new alert modals
Diffstat (limited to 'ui/app/components/modals/modal.js')
-rw-r--r-- | ui/app/components/modals/modal.js | 72 |
1 files changed, 41 insertions, 31 deletions
diff --git a/ui/app/components/modals/modal.js b/ui/app/components/modals/modal.js index 841189277..85e85597a 100644 --- a/ui/app/components/modals/modal.js +++ b/ui/app/components/modals/modal.js @@ -19,8 +19,30 @@ const ShapeshiftDepositTxModal = require('./shapeshift-deposit-tx-modal.js') const HideTokenConfirmationModal = require('./hide-token-confirmation-modal') const CustomizeGasModal = require('../customize-gas-modal') const NotifcationModal = require('./notification-modal') -const ConfirmResetAccount = require('./notification-modals/confirm-reset-account') +const ConfirmResetAccount = require('./confirm-reset-account') const TransactionConfirmed = require('./transaction-confirmed') +const WelcomeBeta = require('./welcome-beta') +const Notification = require('./notification') + +const modalContainerBaseStyle = { + transform: 'translate3d(-50%, 0, 0px)', + border: '1px solid #CCCFD1', + borderRadius: '8px', + backgroundColor: '#FFFFFF', + boxShadow: '0 2px 22px 0 rgba(0,0,0,0.2)', +} + +const modalContainerLaptopStyle = { + ...modalContainerBaseStyle, + width: '344px', + top: '15%', +} + +const modalContainerMobileStyle = { + ...modalContainerBaseStyle, + width: '309px', + top: '12.5%', +} const accountModalStyle = { mobileModalStyle: { @@ -174,18 +196,18 @@ const MODALS = { BETA_UI_NOTIFICATION_MODAL: { contents: [ - h(NotifcationModal, { - header: 'uiWelcome', - message: 'uiWelcomeMessage', - }), + h(Notification, [ + h(WelcomeBeta), + ]), ], mobileModalStyle: { - width: '95%', - top: getEnvironmentType(window.location.href) === ENVIRONMENT_TYPE_POPUP ? '52vh' : '36.5vh', + ...modalContainerMobileStyle, }, laptopModalStyle: { - width: '449px', - top: 'calc(33% + 45px)', + ...modalContainerLaptopStyle, + }, + contentStyle: { + borderRadius: '8px', }, }, @@ -209,12 +231,13 @@ const MODALS = { CONFIRM_RESET_ACCOUNT: { contents: h(ConfirmResetAccount), mobileModalStyle: { - width: '95%', - top: getEnvironmentType(window.location.href) === ENVIRONMENT_TYPE_POPUP ? '52vh' : '36.5vh', + ...modalContainerMobileStyle, }, laptopModalStyle: { - width: '473px', - top: 'calc(33% + 45px)', + ...modalContainerLaptopStyle, + }, + contentStyle: { + borderRadius: '8px', }, }, @@ -269,31 +292,18 @@ const MODALS = { TRANSACTION_CONFIRMED: { disableBackdropClick: true, contents: [ - h(TransactionConfirmed, {}, []), + h(Notification, [ + h(TransactionConfirmed), + ]), ], mobileModalStyle: { - width: '100%', - height: '100%', - transform: 'none', - left: '0', - right: '0', - margin: '0 auto', - boxShadow: '0 0 7px 0 rgba(0,0,0,0.08)', - top: '0', - display: 'flex', + ...modalContainerMobileStyle, }, laptopModalStyle: { - width: '344px', - transform: 'translate3d(-50%, 0, 0px)', - top: '15%', - border: '1px solid #CCCFD1', - borderRadius: '8px', - backgroundColor: '#FFFFFF', - boxShadow: '0 2px 22px 0 rgba(0,0,0,0.2)', + ...modalContainerLaptopStyle, }, contentStyle: { borderRadius: '8px', - height: '100%', }, }, |