https://github.com/bhar4t/reuse-react-component
React Component to npm as resuseable component.
https://github.com/bhar4t/reuse-react-component
component javascript react snackbar
Last synced: 7 months ago
JSON representation
React Component to npm as resuseable component.
- Host: GitHub
- URL: https://github.com/bhar4t/reuse-react-component
- Owner: bhar4t
- Created: 2021-08-06T11:25:45.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-14T16:35:45.000Z (about 4 years ago)
- Last Synced: 2025-03-16T15:06:05.309Z (7 months ago)
- Topics: component, javascript, react, snackbar
- Language: JavaScript
- Homepage: https://bhar4t.com/packages
- Size: 782 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Snackbar
Use very elegant fully customisable, with automatically disappearable snackbar in your React application.
- Customisable CSS (inline or by custom classname)
- Manage disappear time
- Multiple Modes
- Show in any place
- Action Handling
### install
npm i reuse-react-snackbar
or
yarn add reuse-react-snackbar
### Demo Screenshot

| Props | Detail (Default/Options) | Requirement |
|---------------|---------------------------------------|-------------------|
| message | String (No message) | Mandatory |
| mode | String - WARNING/ERROR/SUCCESS | Mandatory |
| open | Boolean (false) | Mandatory |
| timeout | Number (3000) - 1000 to 10000 | Optional |
| bottom | Boolean (true) | Optional |
| right | Boolean (true) | Optional |
| action | Callback function (clickEvt => {}) | Optional |
| actionLabel | String (Ok) | Optional |
| className | String (alert) | Optional |
| style | Object | Optional |
### import
import SnackBar from 'reuse-react-snackbar'
### Usage
```js
```
### Inline CSS
```js
```
Output

### Action
```js
{
console.log(`Clicked on Done!`, e)
}}
/>
```