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

refactor!: onClickReaction now passes ReactionObj #37

Merged
merged 7 commits into from
Jul 27, 2022

Conversation

dylandbl
Copy link
Owner

@dylandbl dylandbl commented Jul 27, 2022

Summary

  • Changed onClickReaction to pass ReactionObj instead of Element, as it will contain all the object's relevant info.
  • index.ts now exports ReactionObj - can be imported from "react-quick-reactions/lib/esm/types/index".
  • Implemented the changes into /example.

Why this change is needed

Passing the element meant that only the data contained in the emoji's <span> could be received; Passing the object ensures all the emoji's relevant data is passed.

What was done

Changed onClickReaction type to (reaction: ReactionObj) => void, implemented the new change into /example.

@dylandbl dylandbl merged commit ffd5bd9 into main Jul 27, 2022
@dylandbl dylandbl deleted the refactor/onClickReaction branch July 27, 2022 01:19
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.

1 participant