apeman-react-captcha
apeman react package for captcha component.
Last updated a year ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install apeman-react-captcha 
SYNC missed versions from official npm registry.

apeman-react-captcha

Build Status Code Climate Code Coverage npm Version JS Standard

apeman react package for captcha component.

Installation

$ npm install apeman-react-captcha --save

Demo

Live demo is hosted on GitHub Pages.

Demo Image

Usage

'use strict'

import React from 'react'
import {ApCaptcha, ApCaptchaStyle} from 'apeman-react-captcha'

const ExampleComponent = React.createClass({
  getInitialState () {
    return {
      captchaSrc: './captcha.svg'
    }
  },
  render () {
    const s = this
    let { state } = s
    return (
      <div>
        <ApCaptchaStyle />
        <ApCaptcha src={ state.captchaSrc }
                   refreshText="refresh"
                   onRefresh={ s.refreshCaptcha }/>
      </div>
    )
  },
  refreshCaptcha () {
    const s = this
    let time = new Date().getTime()
    console.log('refreshCaptcha:', time)
    s.setState({
      captchaSrc: `./images/mock-captcha.svg?t=${time}`
    })
  }
})

Components

ApCaptchaStyle

Props

Name Type Default Description

ApCaptchaSvg

Props

Name Type Default Description

ApCaptcha

Props

Name Type Default Description

License

This software is released under the MIT License.

Links

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 30
Dependencies (12)
Dev Dependencies (28)

Copyright 2014 - 2017 © taobao.org |