apeman-react-image
v4.1.5
Published
apeman react package for image component.
Maintainers
Readme
apeman-react-image
apeman react package for image component.
Installation
$ npm install apeman-react-image --saveDemo
Live demo is hosted on GitHub Pages.
Usage
'use strict'
import React, {PropTypes as types} from 'react'
import {ApImage, ApImageStyle} from 'apeman-react-image'
const ExampleComponent = React.createClass({
render () {
return (
<div>
<ApImageStyle backgroundColor='#333'
/>
<ApImage src='http://example.com/images/sample.png'
alt='This is it!'
scale='fit'
/>
</div>
)
}
})
Components
ApImageStyle
Props
| Name | Type | Default | Description | | ---- | ---- | ------- | ----------- |
ApImage
Props
| Name | Type | Default | Description | | ---- | ---- | ------- | ----------- | | scale | enum | 'none' | | Image scaling policy | | width | number|string | 300 | | Image width | | height | number|string | 150 | | Image height | | src | string | null | | Image src string | | alt | string | 'NO IMAGE' | | Alt test | | spinnerTheme | string | ApSpinner.DEFAULT_THEME | | Them of spinner | | onLoad | func | null | | Handler on image load | | onError | func | null | | Handler on image error. |
License
This software is released under the MIT License.

