Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/mirinzhang/react-native-modal-alert

a react-native custom alert component
https://github.com/mirinzhang/react-native-modal-alert

Last synced: 3 days ago
JSON representation

a react-native custom alert component

Awesome Lists containing this project

README

        

# react-native-modal-alert

A react-native custom alert component

### Install

`yarn add react-native-modal-alert`

or

`npm install -S react-native-modal-alert`

### Usage

```javascript
import React from 'react';
import { View, Text, TouchableOpacity } from 'react-native';
import ModalAlert from 'react-native-modal-alert';

export default class App extends React.PureComponent {
constructor(props) {
super(props);

this.state = {
isShow: false
};
}

show = () => {
this.setState({ isShow: true });
};

hide = () => {
this.setState({ isShow: false });
};

onShow = () => {
console.log('render alert');
};

render() {
return (


Toggle


modal content


);
}
}
```