Skip to content

Commit

Permalink
chore: add language options
Browse files Browse the repository at this point in the history
  • Loading branch information
yuskhan committed Sep 10, 2024
1 parent 3deb99b commit a0510c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface TurnstileOptions {
'error-callback'?: (errorCode: string) => boolean;
'expired-callback'?: () => void;
theme?: 'light' | 'dark' | 'auto';
language?: string;
tabindex?: number;
appearance?: 'always' | 'execute' | 'interaction-only';
}
2 changes: 2 additions & 0 deletions projects/ngx-turnstile/src/lib/ngx-turnstile.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export class NgxTurnstileComponent implements AfterViewInit, OnDestroy {
@Input() action?: string;
@Input() cData?: string;
@Input() theme?: 'light' | 'dark' | 'auto' = 'auto';
@Input() language?: string = 'auto';
@Input() version: SupportedVersion = '0';
@Input() tabIndex?: number;
@Input() appearance?: 'always' | 'execute' | 'interaction-only' = 'always';
Expand All @@ -66,6 +67,7 @@ export class NgxTurnstileComponent implements AfterViewInit, OnDestroy {
let turnstileOptions: TurnstileOptions = {
sitekey: this.siteKey,
theme: this.theme,
language: this.language,
tabindex: this.tabIndex,
action: this.action,
cData: this.cData,
Expand Down

0 comments on commit a0510c4

Please sign in to comment.