Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jacklam718/react-native-modal-component

React Native Modal for IOS and Android
https://github.com/jacklam718/react-native-modal-component

dialog modal react-native-dialog react-native-modal

Last synced: about 2 months ago
JSON representation

React Native Modal for IOS and Android

Awesome Lists containing this project

README

        

# React Native Modal Component
React Native Modal Component for iOS & Android.

Pull request are welcomed. Please follow the Airbnb style guide [Airbnb JavaScript](https://github.com/airbnb/javascript)

[Try it with Exponent](https://exp.host/@jacklam718/modal-example)

## Installation
##### yarn
`yarn add react-native-modal-component`
##### npm
`npm install --save react-native-modal-component`

## peerDependencies
* react-native-deprecated-custom-components >= ^0.1.1

## Usage with ModalComponent
```javascript
import { View, Text, TouchableOpacity } from 'react-native';
import ModalComponent from 'react-native-modal-component';
```

##### Modal content
```javascript
const content = (



React Native Modal Component{'\n'}



);
```

```javascript
{ this.modal = modal; }}
content={content}
dismissOnHardwareBackPress
showCloseButton={false}
leftItem={{
title: 'CLOSE',
layout: 'title',
onPress: () => {
this.modal.dismiss(() => {
console.log('callback');
});
},
}}
>

{ this.modal.show(); }} >
Show Modal

```