Skip to content

Commit 37dc391

Browse files
committed
add appearance and execution
1 parent dc4b03b commit 37dc391

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

HISTORY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- `refreshExpired` option
1313
- `language` option
14+
- `appearance` option
15+
- `execution` option
1416

1517
### Changed
1618

src/index.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ export default function Turnstile({
5959
retry,
6060
retryInterval,
6161
refreshExpired,
62+
appearance,
63+
execution,
6264
userRef,
6365
onVerify,
6466
onLoad,
@@ -99,6 +101,8 @@ export default function Turnstile({
99101
retry,
100102
"retry-interval": retryInterval,
101103
"refresh-expired": refreshExpired,
104+
appearance,
105+
execution,
102106
callback: (token: string) => inplaceState.onVerify(token),
103107
"error-callback": () => inplaceState.onError?.(),
104108
"expired-callback": () => inplaceState.onExpire?.(),
@@ -125,6 +129,8 @@ export default function Turnstile({
125129
retry,
126130
retryInterval,
127131
refreshExpired,
132+
appearance,
133+
execution,
128134
]);
129135
useEffect(() => {
130136
inplaceState.onVerify = onVerify;
@@ -150,6 +156,8 @@ interface TurnstileProps extends TurnstileCallbacks {
150156
retry?: "auto" | "never";
151157
retryInterval?: number;
152158
refreshExpired?: "auto" | "manual" | "never";
159+
appearance?: "always" | "execute" | "interaction-only";
160+
execution?: "render" | "execute";
153161
id?: string;
154162
userRef?: React.MutableRefObject<HTMLDivElement>;
155163
className?: string;

0 commit comments

Comments
 (0)