diff options
author | sdtsui <szehungdanieltsui@gmail.com> | 2017-08-10 07:03:14 +0800 |
---|---|---|
committer | sdtsui <szehungdanieltsui@gmail.com> | 2017-08-10 12:42:16 +0800 |
commit | 231b8a75427e2b14a3ef29fef0bc71c35acd97ee (patch) | |
tree | 9921187cd2599813afdab8054686fa2770a3c2c9 /ui/app/components | |
parent | cba50818c2209de95e75a225e418df79fb727045 (diff) | |
download | tangerine-wallet-browser-231b8a75427e2b14a3ef29fef0bc71c35acd97ee.tar tangerine-wallet-browser-231b8a75427e2b14a3ef29fef0bc71c35acd97ee.tar.gz tangerine-wallet-browser-231b8a75427e2b14a3ef29fef0bc71c35acd97ee.tar.bz2 tangerine-wallet-browser-231b8a75427e2b14a3ef29fef0bc71c35acd97ee.tar.lz tangerine-wallet-browser-231b8a75427e2b14a3ef29fef0bc71c35acd97ee.tar.xz tangerine-wallet-browser-231b8a75427e2b14a3ef29fef0bc71c35acd97ee.tar.zst tangerine-wallet-browser-231b8a75427e2b14a3ef29fef0bc71c35acd97ee.zip |
Vertically center modal in mobile view - @cjeria
Diffstat (limited to 'ui/app/components')
-rw-r--r-- | ui/app/components/modal.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/app/components/modal.js b/ui/app/components/modal.js index 89de1cedb..bc365c0e9 100644 --- a/ui/app/components/modal.js +++ b/ui/app/components/modal.js @@ -5,6 +5,7 @@ const connect = require('react-redux').connect const FadeModal = require('boron').FadeModal const actions = require('../actions') const isMobileView = require('../../lib/is-mobile-view') +const isPopupOrNotification = require('../../../app/scripts/lib/is-popup-or-notification') function mapStateToProps (state) { return { @@ -29,12 +30,14 @@ module.exports = connect(mapStateToProps, mapDispatchToProps)(Modal) const mobileModalStyles = { width: '95%', + // Used to create matching t/l/r/b space in mobile view. + top: isPopupOrNotification() === 'popup' ? '47vh' : '36.5vh', boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px', } const laptopModalStyles = { width: '66%', - top: '30%', + top: 'calc(30% + 10px)', boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px', } |