Skip to content
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

Merged
merged 2 commits into from
Jan 14, 2022
Merged

feat: add type for state returned by useCheckbox #5375

merged 2 commits into from
Jan 14, 2022

Conversation

noobinthisgame
Copy link
Contributor

@noobinthisgame noobinthisgame commented Jan 11, 2022

📝 Description

Added a CheckboxState type as the return type of the state returned by the useCheckbox hook.

⛳️ Current behavior (updates)

Old return type:

image

🚀 New behavior

New return type:

image

Added type:

image

💣 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

@vercel
Copy link

vercel bot commented Jan 11, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/chakra-ui/chakra-ui-storybook/9EqZdzjH9kJ9F24UJoDFbg5ng9ke
✅ Preview: https://chakra-ui-storybook-git-fork-noobinthisgame-fe-545f5a-chakra-ui.vercel.app

@changeset-bot
Copy link

changeset-bot bot commented Jan 11, 2022

🦋 Changeset detected

Latest commit: b3404b3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@chakra-ui/checkbox Patch
@chakra-ui/react Patch
@chakra-ui/switch Patch
@chakra-ui/props-docs Patch
@chakra-ui/test-utils Patch

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

@codesandbox-ci
Copy link

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:

Sandbox Source
create-react-app-ts Configuration

@noobinthisgame noobinthisgame changed the title feat: add useCheckbox types for state feat: add type for state returned by useCheckbox Jan 11, 2022
@MrHBS
Copy link

MrHBS commented Jan 12, 2022

What theme is that?

@noobinthisgame
Copy link
Contributor Author

Synthwave '84 :)

Copy link
Contributor

@sohamsshah sohamsshah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀👍!

Copy link
Contributor

@nikolovlazar nikolovlazar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

@TimKolberger TimKolberger removed the review needed 🔬 Kindly review this PR label Jan 14, 2022
Copy link
Contributor

@TimKolberger TimKolberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💖

@TimKolberger TimKolberger merged commit c9c54ae into chakra-ui:main Jan 14, 2022
@TimKolberger
Copy link
Contributor

@all-contributors please add @noobinthisgame for docs and code

@allcontributors
Copy link
Contributor

@TimKolberger

I've put up a pull request to add @noobinthisgame! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants