-
Notifications
You must be signed in to change notification settings - Fork 324
Add new options to Money and useMoney #1215
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
Conversation
mcvinci
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much, @frehner! Just added a few minor suggestions for the docs. 🚀
Co-authored-by: Michelle Vinci <[email protected]>
Co-authored-by: Michelle Vinci <[email protected]>
Co-authored-by: Michelle Vinci <[email protected]>
Co-authored-by: Michelle Vinci <[email protected]>
Co-authored-by: Michelle Vinci <[email protected]>
Co-authored-by: Michelle Vinci <[email protected]>
| <Money data={money} withoutTrailingZeros /> | ||
| ); | ||
|
|
||
| expect(component).not.toContainReactText(`€${money.amount}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just hard code the 19.00 here.
| expect(component).toContainReactComponent(Link, {to: '/test'}); | ||
| }); | ||
|
|
||
| it(`removes trailing zeros when the prop is passed`, () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it is verbose, but I suggest specifying the prop (ie: when the withoutTrailingZeros prop is passed)
* v1.x-2022-07: Fix stale product options (#1210) Upgrade body-parser in hydrogen package (#1232) Add new options to Money and useMoney (#1215) fix links (#1229) Update turbo and instructions for developing `dev` (#1225) Heck - deploy all branches to Oxygen add context for initialvariantid (#1217) Build chunks are inside assets folder (#1211) Upgraded to SFAPI 2022-07 (#1214) [ci] release v1.x-2022-07 (#1205) Make this a patch instead of minor add references to video in file_reference block (#1197) Laying the foundation for building components in isolation (#1188) Make metafields optional within the ProductProvider. Fixes #1127 (#1209) Add README to /templates directory (#1163) fix perf tracking and make it optional from developer's end (#1096) docs fixes (#1204)
Description
Closes #1164
Additional context
I figured that since
useMoneyreally is the source of truth for<Money />, then it also makes sense to add these options to theuseMoneyhook.Tests for both were updated.
Pinging @mcvinci for docs feedback.
Before submitting the PR, please make sure you do the following:
fixes #123)yarn changeset addif this PR cause a version bump based on Keep a Changelog and adheres to Semantic Versioning