d2iq/ui-kit

Refactor the use of deprecated `onKeyPress`

Closed this issue ยท 2 comments

Description

We have uses of onKeyPress in the application that need to be updated. It is used in the Clickable, ButtonCard, and TextInputWithBadges components. Keydown is an alternative to keypress.

Resource for Keyboard Events: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code
Resource for Keyboard Events in React: https://reactjs.org/docs/events.html#keyboard-events

Screenshot 2023-01-11 at 12 50 25 PM

Acceptance Criteria

Update anywhere that onKeyPress is used.

How to Contribute

Please review the contributing documentation beforehand.

Steps to Contribute:

  1. Fork the repository.
  2. Clone it to your local system.
  3. Create a new branch.
  4. Make your changes. Make sure that tests are still passing. To update snapshot tests, run npm run test -- -u and include the updated tests in your commit.
  5. Commit your changes. When committing prefix your commit message with the appropriate conventional commit type. For example, refactor: <component_name> tests.
  6. Push up your changes. In GitHub, click the compare & pull request button to begin drafting your pull request.
  7. Fill out the pull request form and attach the "ready for review" label when complete.

Hi @nataliepina, I'd love to grab this issue!

Hey, @derekhassan pleas do!
I've assigned you, if you need any further help don't hesitate to task. ๐Ÿš€