A pure JavaScript React Native component for Custom Alerts view. This component will generate same UI for both Android and iOS.
- Installation
- Supported versions
- Usage
- Method
- Want to Contribute?
- Need Help?
- Collection of Components
- Changelog
- License
- Keywords
$ npm install rn-weblineindia-custom-alert-view --save
ReactNative 0.60 - 0.62.5 is supported for v1.0.0 of this component.
showAlertView() {
let object = {
// Options put here...
title: 'Custom Dailog',
message: 'This is Custom Alert Dialog.',
arrAlertItems: ['OK'],
buttonFlow: 'row'
}
this.props.showAlertView(object, (index) => {
if (index === 0) {
// callback actions here...
}
})
}
<TouchableOpacity onPress={() => this.showAlertView()}>
<Text>Try me</Text>
</TouchableOpacity>
}
Enabling any component for custom alert is very easy. Take a look at the code:
/* @flow */
import CustomAlerts from 'rn-weblineindia-custom-alert-view';
class App extends Component{
// code here...
}
export default CustomAlerts(App)
Use this.props.showAlertView
to access this method.
Method | Parameter |
---|---|
showAlertView | (Object,Callback) |
Options | Type | Description |
---|---|---|
title | string |
Title to be displayed in the alert |
message | string |
Message to be displayed |
arrAlertItems | array |
Array of the string to be displayed in the button label |
arrDestructiveItems | array |
Array of the string to be displayed in the destructive button label |
buttonFlow | string |
There are two options to be displayed buttons 'column' and 'row' |
this.props.showAlertView(object, (index) => {
if (index === 0) {
// callback actions here...
}
})
- Created something awesome, made this code better, added some functionality, or whatever (this is the hardest part).
- Fork it.
- Create new branch to contribute your changes.
- Commit all your changes to your branch.
- Submit a pull request.
We also provide a free, basic support for all users who want to use this React Native Custom Alert View component in their software project. In case you want to customize this Custom Alert View component to suit your development needs, then feel free to contact our ReactNative developers.
We have built many other components and free resources for software development in various programming languages. Kindly click here to view our Free Resources for Software Development.
Detailed changes for each release are documented in CHANGELOG.md.
rn-weblineindia-custom-alert-view, react-native-custom-alert-view, custom-alert-view, react-native