apeman-react-notice
v3.0.1
Published
apeman react package for notice components
Downloads
481
Maintainers
Readme
apeman-react-notice
apeman react package for notice components
Installation
$ npm install apeman-react-notice --saveDemo
Live demo is hosted on GitHub Pages.
Usage
'use strict'
import React from 'react'
import {ApNotice, ApNoticeStyle} from 'apeman-react-notice'
const ExampleComponent = React.createClass({
render () {
const s = this
return (
<div>
<ApNoticeStyle />
<ApNotice>
<ApNoticeItem text="Are you sure to do that?"
actions={
{
'YES': s._handleYes ,
'NO':s._handleNo
}
}/>
</ApNotice>
</div>
)
},
_handleYes() {
/* ... */
},
_handleNo() {
/* ... */
}
})
Components
ApNoticeItem
Props
| Name | Type | Default | Description | | ---- | ---- | ------- | ----------- | | text | string | null | | Item text | | actions | object | null | | Action button text and handlers | | hidden | bool | false | | Hide component | | level | enum | 'DEFAULT' | | Information level |
ApNoticeStyle
Props
| Name | Type | Default | Description | | ---- | ---- | ------- | ----------- | | style | object | {} | | | | highlightColor | string | ApStyle.DEFAULT_HIGHLIGHT_COLOR | | | | backgroundColor | | ApStyle.DEFAULT_BACKGROUND_COLOR | | | | normalColor | | ApStyle.NORMAL_COLOR | | | | infoColor | | ApStyle.INFO_COLOR | | | | warnColor | | ApStyle.WARN_COLOR | | | | errorColor | | ApStyle.ERROR_COLOR | | |
ApNotice
Props
| Name | Type | Default | Description | | ---- | ---- | ------- | ----------- | | spinning | bool | false | | Show spinner | | spinner | string | ApSpinner.DEFAULT_THEME | | Spinner theme |
License
This software is released under the MIT License.
