mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
* * Update typing for js-captcha 1.3 * Add back missing export Mistake made during cut and paste Co-authored-by: Piotr Błażejewicz (Peter Blazejewicz) <peterblazejewicz@users.noreply.github.com> Co-authored-by: Piotr Błażejewicz (Peter Blazejewicz) <peterblazejewicz@users.noreply.github.com>
36 lines
610 B
TypeScript
36 lines
610 B
TypeScript
import jCaptcha from "js-captcha";
|
|
|
|
const myCaptcha1 = new jCaptcha({
|
|
el: "jCaptcha1",
|
|
|
|
requiredValue: "*",
|
|
|
|
resetOnError: true,
|
|
focusOnError: true,
|
|
clearOnSubmit: true,
|
|
|
|
canvasClass: 'jCaptchaCanvas',
|
|
canvasStyle: {
|
|
width: 100,
|
|
height: 15,
|
|
textBaseline: 'top',
|
|
font: '15px Arial',
|
|
textAlign: 'left',
|
|
fillStyle: '#ddd'
|
|
},
|
|
|
|
callback: (response, captcha, numberOfTries) => {
|
|
if (response === "success") {
|
|
// Do something
|
|
}
|
|
|
|
if (response === "error") {
|
|
// Do something
|
|
}
|
|
},
|
|
});
|
|
|
|
const myCaptcha2 = new jCaptcha({
|
|
canvasStyle: {},
|
|
});
|