* Modal with bottom slide out animation * Customizable content components * Support Android and IOS
npm install rn-bottom-modal* Modal with bottom slide out animation
* Customizable content components
* Support Android and IOS
$ yarn add rn-bottom-modal
or
$ npm install rn-bottom-modal --save
import {BottomModal} from 'rn-bottom-modal'
| Props | Type | Desc | Default |
| :---------------- | :------------------- | ------------------------------------------------------------ | --------- |
| containerStyle | StyleProp
| hasMask | boolean | Sets whether show mask. | true |
| touchOutsideClose | boolean | Sets whether touch outside the content to close this modal. | true |
| backKeyClose | boolean | Sets whether close this modal with android BACK key . [only Android] | true |
| keyboardAvoid | boolean | Sets whether use KeyboardAvoidingView. [only IOS] | false |
| onShow | function | Sets the show callback. | undefined |
| onDismiss | function | Sets the close callback. | undefined |
| Methods | Desc |
| --------- | ----------------------------------------- |
| show() | use ref call this function to show modal |
| dismiss() | use ref call this function to close modal |
``tsx``
title="show Modal"
onPress={()=>{
ref.current?.show()
}}/>
containerStyle={{ height: 200 }}
onShow={()=>{
console.info("show======")
}}
onDismiss={() => {
console.info("dismiss======")
}}>
