apeman-react-image

 
 
 
 
'use strict'
 
import React, {PropTypes as types} from 'react'
import ApImage from '../../lib/ap_image'
import ApImageStyle from '../../lib/ap_image_style'
 
const Demo = React.createClass({
  render () {
    let width = 204
    let height = 204
    let style = { margin: '16px' }
    return (
      <div>
        <ApImageStyle />
        <ApImage src={ IMAGE_URL }
                 width={ width }
                 height={ height }
                 scale="fit"
                 style={ style }
        />
        <ApImage src={ IMAGE_URL }
                 width={ width }
                 height={ height }
                 scale="fill"
                 style={ style }
        />
        <ApImage src={ IMAGE_URL }
                 width={ width }
                 height={ height }
                 scale="none"
                 style={ style }
        />
        <ApImage src="./images/__not_found__"
                 width={ width }
                 height={ height }
                 scale="none"
                 style={ style }
        />
      </div>
    )
  }
})
 
export default Demo