Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/mirinzhang/react-native-modal-alert
- Owner: mirinzhang
- Created: 2019-05-06T12:49:52.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-08T03:42:45.000Z (over 5 years ago)
- Last Synced: 2024-10-11T13:44:07.879Z (27 days ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
);
}
}
```