apeman-react-upload
apeman react package for file upload components.
Last updated 3 years ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install apeman-react-upload 
SYNC missed versions from official npm registry.

apeman-react-upload

Build Status Code Climate Code Coverage npm Version JS Standard

apeman react package for file upload components.

Installation

$ npm install apeman-react-upload --save

Demo

Live demo is hosted on GitHub Pages.

Demo Image

Usage

'use strict'

import React from 'react'
import {ApUpload, ApUploadStyle} from 'apeman-react-upload'

const ExampleComponent = React.createClass({
  render () {
    const s = this
    return (
      <div>
        <ApUploadStyle/>
        <ApUpload multiple={ false }
                  id="demo-file-upload-01"
                  name="file-input-01"
                  accept="image/*"
                  onLoad={ s.handleLoaded }
                  onError={ s.handleError }/>
      </div>
    )
  },
  handleLoaded (urls) {
    console.log('Image urls:', urls)
    /* ... */
  },
  handleError (err) {
    /* ... */
  }
})

Components

ApUploadStyle

Props

Name Type Default Description
style object {}
highlightColor string ApStyle.DEFAULT_HIGHLIGHT_COLOR
backgroundColor string ApStyle.DEFAULT_BACKGROUND_COLOR

ApUpload

Props

Name Type Default Description
name string null
id string `ap-upload-${uuid.v4()}`
multiple bool false
onChange func null
onLoad func null
onError func null
width number 180
height number 180
text string 'Upload file'
accept string null
icon string 'fa fa-cloud-upload'
closeIcon string 'fa fa-close'
spinner string
value string array
spinnerIcon ApSpinner.DEFAULT_THEME

License

This software is released under the MIT License.

Links

Current Tags

  • 3.1.1                                ...           latest (3 years ago)

21 Versions

  • 3.1.1                                ...           3 years ago
  • 3.1.0                                ...           3 years ago
  • 3.0.2                                ...           4 years ago
  • 3.0.1                                ...           4 years ago
  • 3.0.0                                ...           4 years ago
  • 2.0.8                                ...           4 years ago
  • 2.0.7                                ...           4 years ago
  • 2.0.6                                ...           4 years ago
  • 2.0.5                                ...           4 years ago
  • 2.0.4                                ...           4 years ago
  • 2.0.3                                ...           4 years ago
  • 2.0.2                                ...           4 years ago
  • 2.0.1                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.1.4                                ...           4 years ago
  • 1.1.3                                ...           4 years ago
  • 1.1.2                                ...           4 years ago
  • 1.1.1                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 42
Dependencies (8)
Dev Dependencies (25)

Copyright 2014 - 2016 © taobao.org |