diff --git a/README.md b/README.md index af23865..32f7668 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,8 @@ The component supports these options as input: - `cData` - `theme` - `tabIndex` +- `retry` +- `size` These options are well documented in the [Cloudflare Docs](https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/#configurations). The letter cases are adapted to camelCase to facilitate easy migration from `ng-recaptcha`. diff --git a/projects/ngx-turnstile-demo/src/app/examples/template-driven-form/template-driven-form-example.component.ts b/projects/ngx-turnstile-demo/src/app/examples/template-driven-form/template-driven-form-example.component.ts index e45b638..a1b49c0 100644 --- a/projects/ngx-turnstile-demo/src/app/examples/template-driven-form/template-driven-form-example.component.ts +++ b/projects/ngx-turnstile-demo/src/app/examples/template-driven-form/template-driven-form-example.component.ts @@ -9,6 +9,8 @@ import { NgxTurnstileModule, NgxTurnstileFormsModule } from 'ngx-turnstile'; > diff --git a/projects/ngx-turnstile/src/lib/interfaces/turnstile-options.ts b/projects/ngx-turnstile/src/lib/interfaces/turnstile-options.ts index f20e296..43025b2 100644 --- a/projects/ngx-turnstile/src/lib/interfaces/turnstile-options.ts +++ b/projects/ngx-turnstile/src/lib/interfaces/turnstile-options.ts @@ -9,4 +9,6 @@ export interface TurnstileOptions { language?: string; tabindex?: number; appearance?: 'always' | 'execute' | 'interaction-only'; + retry?: 'never' | 'auto'; + size?: 'normal' | 'flexible' | 'compact'; } diff --git a/projects/ngx-turnstile/src/lib/ngx-turnstile.component.ts b/projects/ngx-turnstile/src/lib/ngx-turnstile.component.ts index 4641f0d..7d07859 100644 --- a/projects/ngx-turnstile/src/lib/ngx-turnstile.component.ts +++ b/projects/ngx-turnstile/src/lib/ngx-turnstile.component.ts @@ -48,6 +48,8 @@ export class NgxTurnstileComponent implements OnDestroy { @Input() version: SupportedVersion = '0'; @Input() tabIndex?: number; @Input() appearance?: 'always' | 'execute' | 'interaction-only' = 'always'; + @Input() retry?: 'never' | 'auto' = 'auto'; + @Input() size?: 'normal' | 'flexible' | 'compact' = 'normal'; @Output() resolved = new EventEmitter(); @Output() errored = new EventEmitter(); @@ -79,6 +81,8 @@ export class NgxTurnstileComponent implements OnDestroy { action: this.action, cData: this.cData, appearance: this.appearance, + retry: this.retry, + size: this.size, callback: (token: string) => { this.zone.run(() => this.resolved.emit(token)); },