react-quick-alert
v1.0.1
Published
Lightweight react snackbar.
Downloads
6
Readme
react-quick-alert
Lightweight react snackbar.
Install
npm install --save react-quick-alert
Usage
Demo Example Code Here
this.state = {
alertShown: false,
alertMessage: ''
};
showAlert(msg) {
this.setState({ alertMessage: msg, alertShown: true });
}
resetAlert() {
this.setState({ alertShown: false });
}
Alert's visibility and message is controlled by solely by function and String passed in by the parent so that the event can easily add customization.
For more details, check out the API below.
Component API
<QuickAlert>
component:
Property | Type | Default | Required | Description
-------- | ---- | ------- | -------- |-----------
time | Number
| n/a | yes | Duration alert shows
show | Boolean
| n/a | yes | Trigger to show alert
message | String
| n/a | yes | Message on alert
resetAlert | Function
| n/a | yes | Removes visibility
showStyle | String
| n/a | yes | Class added on show
alertIdentity | String
| n/a | yes | Unique id for snackbar
Support or Contact
Any questions? Check out our documentation or contact support and we’ll help you sort it out.
License
MIT © calabashlabsllc