/react-native-sliding-modal

A React Native modal you can slide up to expand, slide down to close.

Primary LanguageJavaScriptMIT LicenseMIT

react-native-sliding-modal

Sliding modal as the name suggests a React Native modal you can slide up to expand, slide down to close.

Example

Usage

npm install https://github.com/nazimamin/react-native-sliding-modal/tarball/master --save
import Modal from 'react-native-sliding-modal';
  <Modal
    show={this.state.showModal}
    closeCallback={this.closeModal}
    top={Layout.window.height - 350}
    fullScreenCallback={() => {}}
  >
     <Modal.Header>
        <Text
          Header Title
        </Text>
      </Modal.Header>
    {this.renderModalContent()}
  </Modal>

Props

    show: PropTypes.bool.isRequired,
    children: PropTypes.node,
    closeCallback: PropTypes.func, //callback fires when clicking on backdrop, sliding down modal at `top` prop
    fullScreenCallback: PropTypes.func, //callback fires when modal is full screen
    halfScreenCallback: PropTypes.func, //callback fires when modal if half
    top: PropTypes.number,  //if initially want to open the modal at a specific height. Acts like css top property
    showDefaultHeader: PropTypes.bool