https://github.com/futurewan/rc-toaster
react component of toast
https://github.com/futurewan/rc-toaster
Last synced: about 1 year ago
JSON representation
react component of toast
- Host: GitHub
- URL: https://github.com/futurewan/rc-toaster
- Owner: futurewan
- Created: 2019-09-19T01:37:50.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-07-16T06:10:48.000Z (almost 6 years ago)
- Last Synced: 2024-04-25T13:22:01.563Z (about 2 years ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-toast
react component of toast
## install
```
npm install --save rc-toaster
```
## usage
```
import Toast from 'rc-toaster';
Toast.text('this is a Toast');
Toast.text({
content: this is a Toast,
mask: false,
duration: 5,
onCloseCallBack: function(){
console.log('has close')
}
});
```
## API
| property | explain | type | default |
| :---------- | :--- | :--- | :--- |
| content | show contents | string | - |
| mask | show mask | boolean | true |
| prefixCls | style className | string | 'w-toast' |
| duration | Destruction time | number | 3 |
| onCloseCallBack | close callback | function | - |