Le0Developer / react-turnstile

A very simple React library for Cloudflare Turnstile.
https://turnstile-demo.pages.dev/
MIT License
106 stars 15 forks source link

add flexible size #32

Closed hugo-clemente closed 2 months ago

hugo-clemente commented 2 months ago

Hey, First of all thanks for the work, just wanted to add the flexible size, but had to update the turnstile-types. I read in the previous PR that you wanted to preserve the invisible option, but that makes the types inconsistent between react-turnstile and turnstile-types so i chose to remove it.

Le0Developer commented 2 months ago

expired-callback does actually get the current token as a parameter. Must've forgotten it in turnstile-types, will push an update to it soon™️. See below from api.js: image

Also your style override for width/height is in conflict/duplicated by the fixedSize prop.

Le0Developer commented 2 months ago

I've released v1.2.3 of turnstile-types which adds invisible to size and token to expired-callback

hugo-clemente commented 2 months ago

Yeah sorry had a few back and forth with myself... 😅 It should be good now though, used the updated version of turnstile-types, and fixed the issue with the fixedSized prop

Le0Developer commented 2 months ago

Last missing piece is an entry in HISTORY.md 🙏

hugo-clemente commented 2 months ago

Done !