-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add type for state returned by useCheckbox #5375
feat: add type for state returned by useCheckbox #5375
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/chakra-ui/chakra-ui-storybook/9EqZdzjH9kJ9F24UJoDFbg5ng9ke |
🦋 Changeset detectedLatest commit: b3404b3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit b3404b3:
|
What theme is that? |
Synthwave '84 :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀👍!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💖
@all-contributors please add @noobinthisgame for docs and code |
I've put up a pull request to add @noobinthisgame! 🎉 |
📝 Description
Added a
CheckboxState
type as the return type of the state returned by theuseCheckbox
hook.⛳️ Current behavior (updates)
Old return type:
🚀 New behavior
New return type:
Added type:
💣 Is this a breaking change (Yes/No):
No
📝 Additional Information
While working on the documentation of the
useCheckbox
hooks in the docs repo I figured out it would be easier to use the hook and to document it if the returned state had its own type. Thus I added a type for the state returned from theuseCheckbox
hook