Package Exports
- react-yunpian-captcha
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-yunpian-captcha) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-yunpian-captcha
A YunPian Captcha component for React
Installation
$ npm install --save react-yunpian-captchaUsage
import YunPianCaptcha from 'react-yunpian-captcha';
export default () => {
const onSuccess = (validInfo, close) => console.log(validInfo) || close();
return (
<YunPianCaptcha
appId="your-appId"
version="v1"
onSuccess={onSuccess}
/>
);
};Properties
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,License
MIT