Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/weblineindia/react-native-custom-alert-view
A pure JavaScript React Native component for Custom Alerts view. This component will generate same UI for both Android and iOS.
https://github.com/weblineindia/react-native-custom-alert-view
alertview alertviewcontroller custom-alert customalertview react react-alert react-components react-custom-alert react-native react-native-component
Last synced: 7 days ago
JSON representation
A pure JavaScript React Native component for Custom Alerts view. This component will generate same UI for both Android and iOS.
- Host: GitHub
- URL: https://github.com/weblineindia/react-native-custom-alert-view
- Owner: weblineindia
- License: mit
- Created: 2020-06-23T10:29:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-27T08:06:53.000Z (11 months ago)
- Last Synced: 2024-10-12T17:43:08.295Z (about 1 month ago)
- Topics: alertview, alertviewcontroller, custom-alert, customalertview, react, react-alert, react-components, react-custom-alert, react-native, react-native-component
- Language: JavaScript
- Homepage: https://www.weblineindia.com/communities.html
- Size: 14.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# React Native Custom Alert View Component
A pure JavaScript React Native component for Custom Alerts view. This component will generate same UI for both Android and iOS.
## Getting Started
- [Installation](#installation)
- [Supported versions](#supported-versions)
- [Usage](#usage)
- [Method](#method)
- [Want to Contribute?](#want-to-contribute?)
- [Need Help?](#need-help?)
- [Collection of Components](#collection-of-components)
- [Changelog](#changelog)
- [License](#license)
- [Keywords](#keywords)## Installation
`$ npm install rn-weblineindia-custom-alert-view --save`
## Supported versions
ReactNative 0.60 - 0.62.5 is supported for v1.0.0 of this component.
## Usage
```js
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...
}
})
}
``````javascript
this.showAlertView()}>
Try me}
```
## Using Higher-Order Components
Enabling any component for custom alert is very easy. Take a look at the code:
```js
/* @flow */import CustomAlerts from 'rn-weblineindia-custom-alert-view';
class App extends Component{
// code here...
}export default CustomAlerts(App)
```## Method
Use `this.props.showAlertView` to access this method.
| **Method** | **Parameter** |
|---------------|----------------------|
| showAlertView | \(Object,Callback\) |### Options of Object
| **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' |### Callback
```javascript
this.props.showAlertView(object, (index) => {
if (index === 0) {
// callback actions here...
}
})
```-----
## Want to Contribute?
- Created something awesome, made this code better, added some functionality, or whatever (this is the hardest part).
- [Fork it](http://help.github.com/forking/).
- Create new branch to contribute your changes.
- Commit all your changes to your branch.
- Submit a [pull request](http://help.github.com/pull-requests/).-----
## Need Help?
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](https://www.weblineindia.com/hire-react-native-developers.html).
-----
## Collection of Components
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](https://www.weblineindia.com/communities.html).
------
## Changelog
Detailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md).
## License
[MIT](LICENSE)
[mit]: https://github.com/weblineindia/React-Native-Custom-Alert-View/blob/master/LICENSE
### Keywords
rn-weblineindia-custom-alert-view, react-native-custom-alert-view, custom-alert-view, react-native