Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xlsdg/react-yunpian-captcha

A YunPian Captcha component for React
https://github.com/xlsdg/react-yunpian-captcha

captcha react react-component yunpian

Last synced: about 1 month ago
JSON representation

A YunPian Captcha component for React

Awesome Lists containing this project

README

        

# react-yunpian-captcha

> A YunPian Captcha component for React

## Installation

```bash
$ npm install --save react-yunpian-captcha
```

## Usage

``` react
import YunPianCaptcha from 'react-yunpian-captcha';

export default () => {
const onSuccess = (validInfo, close) => console.log(validInfo) || close();

return (

);
};
```

## Properties

``` javascript
className: PropTypes.string,
onSuccess: PropTypes.func.isRequired,
onFail: PropTypes.func,
onExit: PropTypes.func,
beforeStart: PropTypes.func,
afterStart: PropTypes.func,
expired: PropTypes.number,
jsonpField: PropTypes.string,
rsaPublicKey: PropTypes.string,
hosts: PropTypes.string,
appId: PropTypes.string.isRequired,
version: PropTypes.string.isRequired,
noButton: PropTypes.bool,
mode: PropTypes.string,
winWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
lang: PropTypes.oneOf(['zh-cn', 'en']),
langPack: PropTypes.object,
```

[Read More](https://www.yunpian.com/doc/zh_CN/captcha/captcha_service.html)

## License

MIT