mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Vertically center modal in mobile view - @cjeria
This commit is contained in:
parent
cba50818c2
commit
231b8a7542
@ -5,6 +5,7 @@ const connect = require('react-redux').connect
|
|||||||
const FadeModal = require('boron').FadeModal
|
const FadeModal = require('boron').FadeModal
|
||||||
const actions = require('../actions')
|
const actions = require('../actions')
|
||||||
const isMobileView = require('../../lib/is-mobile-view')
|
const isMobileView = require('../../lib/is-mobile-view')
|
||||||
|
const isPopupOrNotification = require('../../../app/scripts/lib/is-popup-or-notification')
|
||||||
|
|
||||||
function mapStateToProps (state) {
|
function mapStateToProps (state) {
|
||||||
return {
|
return {
|
||||||
@ -29,12 +30,14 @@ module.exports = connect(mapStateToProps, mapDispatchToProps)(Modal)
|
|||||||
|
|
||||||
const mobileModalStyles = {
|
const mobileModalStyles = {
|
||||||
width: '95%',
|
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',
|
boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
|
||||||
}
|
}
|
||||||
|
|
||||||
const laptopModalStyles = {
|
const laptopModalStyles = {
|
||||||
width: '66%',
|
width: '66%',
|
||||||
top: '30%',
|
top: 'calc(30% + 10px)',
|
||||||
boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
|
boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user