Repository navigation
[BpkPriceMarkerButton][BD-11103] Fix price marker onClick event type - #4974
Conversation
|
Visit https://backpack.github.io/storybook-prs/4974 to see this build running in a browser. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Updates BpkPriceMarkerButton’s onClick prop typing to include the click event and adjusts the related unit test to validate event propagation behavior.
Changes:
- Type
onClickas aMouseEventHandler<HTMLButtonElement>instead of() => void. - Update the unit test to assert the click event is received and that propagation can be stopped.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/backpack-web/src/bpk-component-map/src/BpkPriceMarkerButton.tsx | Refines onClick prop typing to a proper React mouse event handler for a <button>. |
| packages/backpack-web/src/bpk-component-map/src/BpkPriceMarkerButton-test.tsx | Reworks the onClick test to check event forwarding and propagation behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Visit https://backpack.github.io/storybook-prs/4974 to see this build running in a browser. |
Changes
BpkPriceMarkerButton'sonClickprop from() => voidtoMouseEventHandler<HTMLButtonElement>, allowing consumers to access the click event.event.stopPropagation().stopPropagation()is not called.Remember to include the following changes:
[Clover-123][BpkButton] Updating the colourREADME.md(If you have created a new component)README.md