react-alert-go
!
React Accordion
✨ react-alert-go is a beautiful way to show alerts on web applications.
Installation
``
$ npm install --save react-alert-go
`
Usage
`
js
import React, { useEffect } from 'react';
import { alertGo, AlertGoContainer } from 'react-alert-go';
const Test = () => {
useEffect(() => {
alertGo('This is default alert box');
}, []);
return (
<>
Testing React Alert Go
>
);
};
export default Test;
``
AlertGoContainer API
| props | type | default | description |
| -------- | ------ | --------- | -------------------------------------------------------------------- |
| position | string | top-right | top-left/top-center/top-right/bottom-left/bottom-center/bottom-right |
| autoClose | number | 5000 | time in mili second |
addAlert API
| argument no. | type | default | required | description |
| ------------ | ------ | ------- | -------- | -------------------------------------- |
| first | string | empty | true | Give a short and concise alert message |
| second | object | {} | false | type(success/error/warning) |
Contribute
Show your ❤️ and support by giving a ⭐. Any suggestions are welcome!.