1 | apeman-react-toast
|
2 | ==========
|
3 |
|
4 |
|
5 | This file is generated by ape-tmpl. Do not update manually.
|
6 | --->
|
7 |
|
8 |
|
9 | <a name="badges"></a>
|
10 |
|
11 | [![Build Status][bd_travis_shield_url]][bd_travis_url]
|
12 | [![Code Climate][bd_codeclimate_shield_url]][bd_codeclimate_url]
|
13 | [![Code Coverage][bd_codeclimate_coverage_shield_url]][bd_codeclimate_url]
|
14 | [![npm Version][bd_npm_shield_url]][bd_npm_url]
|
15 | [![JS Standard][bd_standard_shield_url]][bd_standard_url]
|
16 |
|
17 | [bd_repo_url]: https://github.com/apeman-react-labo/apeman-react-toast
|
18 | [bd_travis_url]: http://travis-ci.org/apeman-react-labo/apeman-react-toast
|
19 | [bd_travis_shield_url]: http://img.shields.io/travis/apeman-react-labo/apeman-react-toast.svg?style=flat
|
20 | [bd_travis_com_url]: http://travis-ci.com/apeman-react-labo/apeman-react-toast
|
21 | [bd_travis_com_shield_url]: https://api.travis-ci.com/apeman-react-labo/apeman-react-toast.svg?token=
|
22 | [bd_license_url]: https://github.com/apeman-react-labo/apeman-react-toast/blob/master/LICENSE
|
23 | [bd_codeclimate_url]: http://codeclimate.com/github/apeman-react-labo/apeman-react-toast
|
24 | [bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/apeman-react-labo/apeman-react-toast.svg?style=flat
|
25 | [bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/apeman-react-labo/apeman-react-toast.svg?style=flat
|
26 | [bd_gemnasium_url]: https://gemnasium.com/apeman-react-labo/apeman-react-toast
|
27 | [bd_gemnasium_shield_url]: https://gemnasium.com/apeman-react-labo/apeman-react-toast.svg
|
28 | [bd_npm_url]: http://www.npmjs.org/package/apeman-react-toast
|
29 | [bd_npm_shield_url]: http://img.shields.io/npm/v/apeman-react-toast.svg?style=flat
|
30 | [bd_standard_url]: http://standardjs.com/
|
31 | [bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 | <a name="description"></a>
|
38 |
|
39 | apeman react package for toast components.
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | <a name="overview"></a>
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 | <a name="sections"></a>
|
54 |
|
55 |
|
56 |
|
57 | <a name="section-doc-guides-01-installation-md"></a>
|
58 | Installation
|
59 | -----
|
60 |
|
61 | ```bash
|
62 | $ npm install apeman-react-toast --save
|
63 | ```
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 | <a name="section-doc-guides-02-demo-md"></a>
|
71 | Demo
|
72 | -----
|
73 |
|
74 | [Live demo][demo_url] is hosted on GitHub Pages.
|
75 |
|
76 | [![Demo Image](./doc/images/screenshot.png)][demo_url]
|
77 |
|
78 | [demo_url]: http://apeman-react-labo.github.io/apeman-react-toast/demo/demo.html
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 | <a name="section-doc-guides-03-usage-md"></a>
|
86 | Usage
|
87 | ---------
|
88 |
|
89 | ```jsx
|
90 | 'use strict'
|
91 |
|
92 | import React from 'react'
|
93 | import {ApToast, ApToastStyle} from 'apeman-react-toast'
|
94 |
|
95 | const ExampleComponent = React.createClass({
|
96 | render () {
|
97 | return (
|
98 | <div>
|
99 | <ApToastStyle />
|
100 | <ApToast/>
|
101 | </div>
|
102 | )
|
103 | }
|
104 | })
|
105 |
|
106 | ```
|
107 |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 | <a name="section-doc-guides-04-components-md"></a>
|
115 | Components
|
116 | -----
|
117 |
|
118 |
|
119 | ### ApErrorToast
|
120 |
|
121 | **Props**
|
122 |
|
123 | | Name | Type | Default | Description |
|
124 | | ---- | ---- | ------- | ----------- |
|
125 | | message | string | null | | |
|
126 | | duration | number | 2000 | | |
|
127 | | icon | string | 'fa fa-check-circle' | | |
|
128 |
|
129 | ### ApInfoToast
|
130 |
|
131 | **Props**
|
132 |
|
133 | | Name | Type | Default | Description |
|
134 | | ---- | ---- | ------- | ----------- |
|
135 | | message | string | null | | |
|
136 | | duration | number | 2000 | | |
|
137 | | icon | string | 'fa fa-exclamation-circle' | | |
|
138 |
|
139 | ### ApToastGroup
|
140 |
|
141 | **Props**
|
142 |
|
143 | | Name | Type | Default | Description |
|
144 | | ---- | ---- | ------- | ----------- |
|
145 | | duration | number | | | |
|
146 | | toaster | instanceOf | null | | |
|
147 |
|
148 | ### ApToastItem
|
149 |
|
150 | **Props**
|
151 |
|
152 | | Name | Type | Default | Description |
|
153 | | ---- | ---- | ------- | ----------- |
|
154 | | text | string | | | |
|
155 | | icon | string | | | |
|
156 |
|
157 | ### ApToastStyle
|
158 |
|
159 | **Props**
|
160 |
|
161 | | Name | Type | Default | Description |
|
162 | | ---- | ---- | ------- | ----------- |
|
163 | | style | object | {} | | |
|
164 | | normalColor | string | ApStyle.NORMAL_COLOR | | |
|
165 | | infoColor | string | ApStyle.INFO_COLOR | | |
|
166 | | warnColor | string | ApStyle.WARN_COLOR | | |
|
167 | | errorColor | string | ApStyle.ERROR_COLOR | | |
|
168 |
|
169 | ### ApToast
|
170 |
|
171 | **Props**
|
172 |
|
173 | | Name | Type | Default | Description |
|
174 | | ---- | ---- | ------- | ----------- |
|
175 | | message | string | null | | |
|
176 | | duration | number | 2000 | | |
|
177 | | icon | string | null | | |
|
178 | | name | string | null | | |
|
179 | | onDismiss | func | null | | |
|
180 |
|
181 | ### ApWarnToast
|
182 |
|
183 | **Props**
|
184 |
|
185 | | Name | Type | Default | Description |
|
186 | | ---- | ---- | ------- | ----------- |
|
187 | | message | string | null | | |
|
188 | | duration | number | 2000 | | |
|
189 | | icon | string | 'fa fa-warning' | | |
|
190 |
|
191 |
|
192 |
|
193 |
|
194 |
|
195 |
|
196 |
|
197 |
|
198 |
|
199 | <a name="license"></a>
|
200 |
|
201 | License
|
202 | -------
|
203 | This software is released under the [MIT License](https://github.com/apeman-react-labo/apeman-react-toast/blob/master/LICENSE).
|
204 |
|
205 |
|
206 |
|
207 |
|
208 |
|
209 | <a name="links"></a>
|
210 |
|
211 | Links
|
212 | ------
|
213 |
|
214 | + [apeman][apeman_url]
|
215 | + [apeman-react-labo][apeman_react_labo_url]
|
216 | + [React][react_url]
|
217 |
|
218 | [apeman_url]: https://github.com/apeman-labo/apeman
|
219 | [apeman_react_labo_url]: https://github.com/apeman-react-labo
|
220 | [react_url]: https://facebook.github.io/react/
|
221 |
|
222 |
|