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 1
1
import React , { useState , useMemo , useRef } from 'react' ;
2
- import { Animated , StyleSheet , LayoutChangeEvent , View } from 'react-native' ;
2
+ import { Animated , StyleSheet , LayoutChangeEvent , Dimensions } from 'react-native' ;
3
3
import MaskLayer , { MaskLayerProps } from '../MaskLayer' ;
4
4
5
+ let MainWidth = Dimensions . get ( 'window' ) . width ;
6
+ let MainHeight = Dimensions . get ( 'window' ) . height ;
7
+
5
8
export interface ModalProps extends MaskLayerProps {
6
9
placement ?: 'top' | 'right' | 'bottom' | 'left' ;
7
10
onClosed ?: ( ) => void ;
@@ -116,22 +119,26 @@ const styles = StyleSheet.create({
116
119
} ,
117
120
top : {
118
121
top : 0 ,
122
+ width : MainWidth ,
119
123
left : 0 ,
120
124
right : 0 ,
121
125
} ,
122
126
bottom : {
123
127
bottom : 0 ,
124
128
left : 0 ,
129
+ width : MainWidth ,
125
130
right : 0 ,
126
131
} ,
127
132
left : {
128
133
bottom : 0 ,
129
134
top : 0 ,
135
+ height : MainHeight ,
130
136
left : 0 ,
131
137
} ,
132
138
right : {
133
139
bottom : 0 ,
134
140
top : 0 ,
141
+ height : MainHeight ,
135
142
right : 0 ,
136
143
} ,
137
144
} ) ;
You can’t perform that action at this time.
0 commit comments