@@ -12,9 +12,11 @@ import {
12
12
View
13
13
} from "react-native";
14
14
import Icon from "react-native-vector-icons/Ionicons";
15
+ import ExtraDimensions from 'react-native-extra-dimensions-android';
15
16
16
17
// Get screen dimensions
17
- const { width, height } = Dimensions.get("window");
18
+ const { width } = Dimensions.get('window');
19
+ const height = Platform.OS === 'ios' ? Dimensions.get('screen').height : Dimensions.get('screen').height - ExtraDimensions.get('SOFT_MENU_BAR_HEIGHT');
18
20
19
21
export default class Drawer extends Component {
20
22
// Define prop types
@@ -28,7 +30,11 @@ export default class Drawer extends Component {
28
30
// Header height
29
31
headerHeight: PropTypes.number,
30
32
// Height of the visible teaser area at the bottom of the screen
31
- teaserHeight: PropTypes.number
33
+ teaserHeight: PropTypes.number,
34
+ // Content extra style
35
+ contentStyle: PropTypes.Object,
36
+ // Backdrop extra style
37
+ backdropStyle: PropTypes.Object,
32
38
};
33
39
34
40
// Set default prop values
@@ -157,7 +163,7 @@ export default class Drawer extends Component {
157
163
{/* Use light status bar because we have dark background */}
158
164
<StatusBar barStyle={"light-content"} />
159
165
{/* Backdrop with animated opacity */}
160
- <Animated.View style={[styles.backdrop, { opacity: animatedOpacity }]}>
166
+ <Animated.View style={[styles.backdrop, { opacity: animatedOpacity }, this.props.backdropStyle ]}>
161
167
{/* Close window when tapped on header */}
162
168
<TouchableWithoutFeedback onPress={this.close}>
163
169
<View style={[styles.header, this.getHeaderStyle()]}>
@@ -186,7 +192,8 @@ export default class Drawer extends Component {
186
192
{ translateY: this._animatedPosition },
187
193
{ translateX: 0 }
188
194
]
189
- }
195
+ },
196
+ this.props.contentStyle,
190
197
]}
191
198
// Handle gestures
192
199
{...this._panResponder.panHandlers}
0 commit comments