Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix-style #46

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Hcaptcha.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ type HcaptchaProps = {
* hCaptcha SDK host identifier. null value means that it will be generated by SDK
*/
host?: string;
/**
* Component to be displayed below the HCaptcha
*/
footerComponent: Element;
}

export default class Hcaptcha extends React.Component<HcaptchaProps> {}
1 change: 1 addition & 0 deletions Hcaptcha.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const buildHcaptchaApiUrl = (jsSrc, siteKey, hl, theme, host, sentry, endpoint,
* @param {string} assethost: Points loaded hCaptcha assets to a user defined asset location, used for proxies. Default: https://newassets.hcaptcha.com (Override only if using first-party hosting feature.)
* @param {string} imghost: Points loaded hCaptcha challenge images to a user defined image location, used for proxies. Default: https://imgs.hcaptcha.com (Override only if using first-party hosting feature.)
* @param {string} host: hCaptcha SDK host identifier. null value means that it will be generated by SDK
* @param {*} footerComponent: Component tomponent to be displayed below the HCaptcha
*/
const Hcaptcha = ({
onMessage,
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class ConfirmHcaptcha extends PureComponent {
imghost,
host,
hasBackdrop,
footerComponent,
} = this.props;

return (
Expand Down Expand Up @@ -79,6 +80,7 @@ class ConfirmHcaptcha extends PureComponent {
imghost={imghost}
host={host}
/>
{footerComponent}
</SafeAreaView>
</Modal>
);
Expand Down