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(EstimateCost): add on total price change providing total and total max #3774

Merged
merged 1 commit into from
May 15, 2024

Conversation

matthprost
Copy link
Collaborator

Summary

Type

  • Enhancement

Summarise concisely:

What is expected?

Add onTotalPriceChange prop on <EstimateCost /> this function will provide total and totalMax when the total price is re-computed allowing users to get that value.

How to use it?

<EstimateCost {...} onTotalPriceChange={({ total, totalMax}) => {
  console.log(total, totalMax)
}}>
   ...
</EstimateCost>

You will notice that total defines the total price and totalMax defines the maximum price when there is a range.

For example if estimate cost shows a total of 100€-200€

  • total = 100 where 100 is a type number
  • totalMax = 200 where 200 is a type number

@matthprost matthprost added the enhancement New feature or request label May 14, 2024
@matthprost matthprost self-assigned this May 14, 2024
Copy link

changeset-bot bot commented May 14, 2024

🦋 Changeset detected

Latest commit: 1ccbdbe

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@ultraviolet/plus Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.58%. Comparing base (5c61866) to head (1ccbdbe).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3774   +/-   ##
=======================================
  Coverage   89.58%   89.58%           
=======================================
  Files         190      190           
  Lines        4206     4206           
  Branches      632      632           
=======================================
  Hits         3768     3768           
  Misses        321      321           
  Partials      117      117           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c61866...1ccbdbe. Read the comment docs.

@matthprost matthprost merged commit 1bb8016 into main May 15, 2024
13 checks passed
@matthprost matthprost deleted the fix/estimate-cost branch May 15, 2024 12:06
@github-actions github-actions bot mentioned this pull request May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants