NASA Planetary Mission

    apeman-react-image

    4.1.5 • Public • Published

    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

    Install

    npm i apeman-react-image

    DownloadsWeekly Downloads

    145

    Version

    4.1.5

    License

    MIT

    Last publish

    Collaborators

    • okunishinishi