File tree Expand file tree Collapse file tree 2 files changed +35
-2
lines changed Expand file tree Collapse file tree 2 files changed +35
-2
lines changed Original file line number Diff line number Diff line change 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+
Original file line number Diff line number Diff line change 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" : {
You can’t perform that action at this time.
0 commit comments