react-native-responsive-app-modal
Create responsive modals easily by auto injecting it to the app root.
Dependencies
Installation
npm install --save react-native-responsive-app-modal
Properties
Prop | Type | Description |
---|---|---|
screenHeight | number |
Used for modal dimensions calculation (Note: users of react-native>=0.43 you don't have to send this property) |
screenWidth | number |
Used for modal dimensions calculation (Note: users of react-native>=0.43 you don't have to send this property) |
verticalMargin | number |
Define spacing between the modal and the screen edges |
horizontalMargin | number |
Define spacing between the modal and the screen edges |
sizeMatching | string ('content' or 'screen') |
define if the modal size should match the screen size or the size of its content |
Note that for react-native<0.43 you should update the screenHeight
and screenWidth
whenever the device rotates.
The Modal Also receives all the props of react-native-modalbox, checkout their repository for the full list.
Usage
;; var Parent = React; var ChildComponent = React;