apeman-react-image

apeman react package for image component.

Usage no npm install needed!

<script type="module">
  import apemanReactImage from 'https://cdn.skypack.dev/apeman-react-image';
</script>

README

apeman-react-image

Build Status Code Climate Code Coverage npm Version JS Standard

apeman react package for image component.

Installation

$ npm install apeman-react-image --save

Demo

Live demo is hosted on GitHub Pages.

Demo Image

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'
width number string 300
height number string 150
src string null
alt string 'NO IMAGE'
spinnerTheme string ApSpinner.DEFAULT_THEME
onLoad func null
onError func null

License

This software is released under the MIT License.

Links