-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52ae505
commit bf61955
Showing
16 changed files
with
10,487 additions
and
45,023 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
{ | ||
"presets" : ["es2015", "react"], | ||
"plugins" : ["transform-object-rest-spread"] | ||
"presets" : [ | ||
"@babel/preset-env", | ||
"@babel/preset-react", | ||
"@babel/preset-typescript", | ||
], | ||
"plugins": [ | ||
"@babel/plugin-transform-typescript" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,17 @@ | ||
{ | ||
"parser": "babel-eslint", | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"jsx": true, | ||
"experimentalObjectRestSpread": true, | ||
"modules": true | ||
} | ||
parser: "@typescript-eslint/parser", | ||
plugins: ["@typescript-eslint"], | ||
env: { | ||
"browser": true | ||
}, | ||
"env": { | ||
"es6": true, | ||
"browser": true, | ||
"node": true, | ||
"amd": true, | ||
"jquery": true | ||
}, | ||
"extends": [ "eslint:recommended" ], | ||
"plugins": [ | ||
"react" | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"rules": { | ||
"block-spacing": [1, "always"], | ||
"comma-spacing": [1, {"before": false, "after": true}], | ||
"computed-property-spacing": [1, "always"], | ||
"curly": [1, "all"], | ||
"indent": [1, 2], | ||
"key-spacing": [1, {"beforeColon": false, "afterColon": true}], | ||
"keyword-spacing": [2, {"before": true, "after": true}], | ||
"linebreak-style": [1, "unix"], | ||
"no-const-assign": 2, | ||
"no-extra-semi": 1, | ||
"no-console": 1, | ||
"no-extra-boolean-cast": 1, | ||
"no-mixed-spaces-and-tabs": 1, | ||
"no-unused-vars": 1, | ||
"no-unreachable": 1, | ||
"no-multiple-empty-lines": [1, {max: 1, maxEOF: 0, maxBOF: 0}], | ||
"object-curly-spacing": [1, "always"], | ||
"prefer-const": 1, | ||
"react/jsx-no-undef": 1, | ||
"react/jsx-uses-react": 1, | ||
"react/jsx-uses-vars": 1, | ||
"strict": 0, | ||
"semi": [1, "always"] | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import * as React from 'react'; | ||
declare global { | ||
interface Window { | ||
grecaptcha: { | ||
render?: (wrapper: HTMLElement, options: { | ||
badge: Props['badge']; | ||
callback: string; | ||
'error-callback': () => void; | ||
'expired-callback': () => void; | ||
sitekey: string; | ||
size: 'invisible'; | ||
tabindex: number; | ||
}) => string; | ||
execute?: (recaptchaId: string) => void; | ||
reset?: (recaptchaId: string) => void; | ||
getResponse?: (recaptchaId: string) => string; | ||
}; | ||
GoogleRecaptchaLoaded: () => void; | ||
} | ||
} | ||
export declare type Callbacks = { | ||
execute: () => void; | ||
getResponse: () => string | undefined; | ||
reset: () => void; | ||
}; | ||
declare type Props = { | ||
badge?: 'bottomright' | 'bottomleft' | 'inline'; | ||
locale?: string; | ||
nonce?: string; | ||
onExpired?: () => void; | ||
onError?: () => void; | ||
onLoaded?: () => void; | ||
onResolved?: () => void; | ||
sitekey: string; | ||
style?: React.CSSProperties; | ||
tabindex?: number; | ||
}; | ||
declare const GoogleRecaptcha: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement & { | ||
callbacks?: Callbacks | undefined; | ||
}>>; | ||
export default GoogleRecaptcha; |
Oops, something went wrong.