UNPKG

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