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(*): implement timer #2590

Merged
merged 18 commits into from
Aug 19, 2024
Merged

Conversation

jeferson-sb
Copy link
Contributor

@jeferson-sb jeferson-sb commented Jun 21, 2024

Implement Zag's Timer in React
as part of #2497

There's one issue still to be solved related to the action trigger, it seems that click handler from timer.getActionTriggerProps() does not modify the machine 🤔 and I couldn't figure out yet.

Demo

countdown-arkui.mp4

Copy link

vercel bot commented Jun 21, 2024

@jeferson-sb is attempting to deploy a commit to the Chakra UI Team on Vercel.

A member of the Team first needs to authorize it.

@jeferson-sb jeferson-sb marked this pull request as ready for review July 9, 2024 23:12
@jeferson-sb
Copy link
Contributor Author

It seems the issue from the getActionTriggerProps props might come from the actions on Zag.js

https://github.com/chakra-ui/zag/blob/70e6f64acc997490ef5c035f0995c6e8c9fd59d9/packages/machines/timer/src/timer.connect.ts#L75-L85

I wonder if it's expecting PAUSE, START, RESUME all uppercase instead of lowercase.

@cschroeter
Copy link
Member

cschroeter commented Jul 25, 2024

@jeferson-sb

I've updated your PR. You were right. A fix in zag-js will be included in the next release.

@segunadebayo segunadebayo changed the title feat(react): implement timer feat(*): implement timer Aug 19, 2024
@segunadebayo segunadebayo merged commit 866da5c into chakra-ui:main Aug 19, 2024
5 of 6 checks passed
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.

None yet

3 participants