0.0.7 • Published 5 years ago
react-native-android-alert-mjr v0.0.7
react-native-android-alert-mjr
this is a library of alert components. you can use it by installing it on your React-Native project.
Installation
npm i react-native-android-alert-mjr
npm i react-native-responsive-screen
npm i react-native-modal
install carefully above package on your react-native project and use,it easily , and simple :tw-1f385:
Usage
Default Alert
import Alert from 'react-native-android-alert-mjr';
render() {
return (
<View>
<Alert
isVisible={this.state.visiblealert}
text={this.state.Alert}
closeText={"close"}
onClose={() => {
this.setState({ visiblealert: false })
}}
/>
</View>
);
}
props
Name | Type | Default | Description |
---|---|---|---|
isVisible | bool | REQUIRED | Show the Alert? |
text | string | REQUIRED | text in center Alert Component |
closeText | string | REQUIRED | text on close button |
onClose | func | () => isVisible(bool) | close modal(!isVisible => close modal) |