@@ -12,9 +12,11 @@ import {
1212 View
1313} from "react-native" ;
1414import Icon from "react-native-vector-icons/Ionicons" ;
15+ import ExtraDimensions from 'react-native-extra-dimensions-android' ;
1516
1617// 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' ) ;
1820
1921export default class Drawer extends Component {
2022 // Define prop types
@@ -28,7 +30,11 @@ export default class Drawer extends Component {
2830 // Header height
2931 headerHeight : PropTypes . number ,
3032 // 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 ,
3238 } ;
3339
3440 // Set default prop values
@@ -157,7 +163,7 @@ export default class Drawer extends Component {
157163 { /* Use light status bar because we have dark background */ }
158164 < StatusBar barStyle = { "light-content" } />
159165 { /* Backdrop with animated opacity */ }
160- < Animated . View style = { [ styles . backdrop , { opacity : animatedOpacity } ] } >
166+ < Animated . View style = { [ styles . backdrop , { opacity : animatedOpacity } , this . props . backdropStyle ] } >
161167 { /* Close window when tapped on header */ }
162168 < TouchableWithoutFeedback onPress = { this . close } >
163169 < View style = { [ styles . header , this . getHeaderStyle ( ) ] } >
@@ -186,7 +192,8 @@ export default class Drawer extends Component {
186192 { translateY : this . _animatedPosition } ,
187193 { translateX : 0 }
188194 ]
189- }
195+ } ,
196+ this . props . contentStyle ,
190197 ] }
191198 // Handle gestures
192199 { ...this . _panResponder . panHandlers }
0 commit comments