apeman-react-toast
v3.0.0
Published
apeman react package for toast components.
Maintainers
Readme
apeman-react-toast
apeman react package for toast components.
Installation
$ npm install apeman-react-toast --saveDemo
Live demo is hosted on GitHub Pages.
Usage
'use strict'
import React from 'react'
import {ApToast, ApToastStyle} from 'apeman-react-toast'
const ExampleComponent = React.createClass({
render () {
return (
<div>
<ApToastStyle />
<ApToast/>
</div>
)
}
})
Components
ApErrorToast
Props
| Name | Type | Default | Description | | ---- | ---- | ------- | ----------- | | messages | | [] | | | | icon | | 'fa fa-check-circle' | | | | dismiss | | null | | | | level | | 'error' | | |
ApInfoToast
Props
| Name | Type | Default | Description | | ---- | ---- | ------- | ----------- | | messages | | [] | | | | icon | | 'fa fa-exclamation-circle' | | | | dismiss | | null | | | | level | | 'info' | | |
ApToastGroup
Props
| Name | Type | Default | Description | | ---- | ---- | ------- | ----------- | | default | arrayOf | | | Default messages | | info | arrayOf | [] | | Info messages | | error | arrayOf | [] | | Error messages | | warn | arrayOf | [] | | Warn messages | | dismiss | func | | | Dismiss message |
ApToastItem
Props
| Name | Type | Default | Description | | ---- | ---- | ------- | ----------- | | text | string | | | | | icon | string | | | |
ApToastStyle
Props
| Name | Type | Default | Description | | ---- | ---- | ------- | ----------- | | style | object | {} | | | | normalColor | string | ApStyle.NORMAL_COLOR | | | | infoColor | string | ApStyle.INFO_COLOR | | | | warnColor | string | ApStyle.WARN_COLOR | | | | errorColor | string | ApStyle.ERROR_COLOR | | | | transitionDuration | | 100 | | |
ApToast
Props
| Name | Type | Default | Description | | ---- | ---- | ------- | ----------- | | messages | arrayOf | [] | | Messages to show | | icon | string | null | | Icon to show | | dismiss | func | null | | Dismiss an item | | level | string | 'default' | | Level of toast | | transitionTimeout | | 100 | | |
ApWarnToast
Props
| Name | Type | Default | Description | | ---- | ---- | ------- | ----------- | | messages | | [] | | | | icon | | 'fa fa-warning' | | | | dismiss | | null | | | | level | | 'warn' | | |
License
This software is released under the MIT License.

