3.1.4 • Published 9 years ago

apeman-react-captcha v3.1.4

Weekly downloads
6
License
MIT
Repository
github
Last release
9 years ago

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

NameTypeDefaultDescription

ApCaptchaSvg

Props

NameTypeDefaultDescription

ApCaptcha

Props

NameTypeDefaultDescription

License

This software is released under the MIT License.

Links

3.1.4

9 years ago

3.1.3

9 years ago

3.1.2

9 years ago

3.1.1

9 years ago

3.1.0

9 years ago

3.0.2

9 years ago

3.0.1

9 years ago

3.0.0

9 years ago

2.0.8

9 years ago

2.0.7

9 years ago

2.0.6

9 years ago

2.0.5

9 years ago

2.0.4

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.0.12

9 years ago

1.0.11

9 years ago

1.0.10

9 years ago

1.0.9

9 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

10 years ago