diff --git a/Hcaptcha.d.ts b/Hcaptcha.d.ts index fa7a414..624680d 100644 --- a/Hcaptcha.d.ts +++ b/Hcaptcha.d.ts @@ -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 {} diff --git a/Hcaptcha.js b/Hcaptcha.js index 9b82b69..ef4207a 100644 --- a/Hcaptcha.js +++ b/Hcaptcha.js @@ -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, diff --git a/index.js b/index.js index 70eb061..8c5b08c 100644 --- a/index.js +++ b/index.js @@ -42,6 +42,7 @@ class ConfirmHcaptcha extends PureComponent { imghost, host, hasBackdrop, + footerComponent, } = this.props; return ( @@ -79,6 +80,7 @@ class ConfirmHcaptcha extends PureComponent { imghost={imghost} host={host} /> + {footerComponent} );