File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 11import React , { useState , useMemo , useRef } from 'react' ;
2- import { Animated , StyleSheet , LayoutChangeEvent , View } from 'react-native' ;
2+ import { Animated , StyleSheet , LayoutChangeEvent , Dimensions } from 'react-native' ;
33import MaskLayer , { MaskLayerProps } from '../MaskLayer' ;
44
5+ let MainWidth = Dimensions . get ( 'window' ) . width ;
6+ let MainHeight = Dimensions . get ( 'window' ) . height ;
7+
58export interface ModalProps extends MaskLayerProps {
69 placement ?: 'top' | 'right' | 'bottom' | 'left' ;
710 onClosed ?: ( ) => void ;
@@ -116,22 +119,26 @@ const styles = StyleSheet.create({
116119 } ,
117120 top : {
118121 top : 0 ,
122+ width : MainWidth ,
119123 left : 0 ,
120124 right : 0 ,
121125 } ,
122126 bottom : {
123127 bottom : 0 ,
124128 left : 0 ,
129+ width : MainWidth ,
125130 right : 0 ,
126131 } ,
127132 left : {
128133 bottom : 0 ,
129134 top : 0 ,
135+ height : MainHeight ,
130136 left : 0 ,
131137 } ,
132138 right : {
133139 bottom : 0 ,
134140 top : 0 ,
141+ height : MainHeight ,
135142 right : 0 ,
136143 } ,
137144} ) ;
You can’t perform that action at this time.
0 commit comments