Skip to content

Commit 9821f28

Browse files
committed
update readme
1 parent 7fca24b commit 9821f28

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

README.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,34 @@
1-
# Toast for React.js.
1+
# Toast for React.js.
2+
## Installation
3+
use npm
4+
```sh
5+
$ npm install ppeerit-react-toast --save
6+
```
7+
## Import into your project
8+
```js
9+
// ES6
10+
// ReactToast is a react component,you can add the ReactToast component in the higher dom node
11+
// toast is a object that has some method to dispatch toast
12+
import ReactToast, {toast} from 'ppeerit-react-toast';
13+
```
14+
## Show toast
15+
just do the method
16+
```js
17+
toast.show('i`am a toast!!!');
18+
```
19+
## Options
20+
toast.show function has `message`, `type` attributes
21+
`toast.show(message, type)`
22+
23+
`message` is the toast content.
24+
25+
the `message` attribute must be set
26+
27+
`type` can use this variants:
28+
29+
- `success` render success style.
30+
- `warning` render warning style.
31+
- `error` render error style.
32+
33+
## wait more ability ...
34+

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ppeerit-react-toast",
3-
"version": "0.0.9",
3+
"version": "0.0.10",
44
"description": "toast for reactjs",
55
"main": "bin/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)