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

Rounds the width of the progress component to 2 decimal places #314

Merged
merged 1 commit into from
May 27, 2024

Conversation

trentjones21
Copy link
Contributor

This PR rounds the width of the progress component to 2 decimal places, as opposed to 0. 2 decimal places seemed like a reasonable precision to me, but I can adjust it if needed. It's rather arbitrary.

Examples:

<.progress value={50} max={100} />

<div class="pc-progress--md pc-progress pc-progress--primary ">
  <!-- BEFORE -->
  <span class="pc-progress__inner--primary pc-progress__inner" style="width: 50%">
  
  <!-- AFTER -->
  <span class="pc-progress__inner--primary pc-progress__inner" style="width: 50.0%">
</div>
<.progress value={2} max={3} />

<div class="pc-progress--md pc-progress pc-progress--primary ">
  <!-- BEFORE -->
  <span class="pc-progress__inner--primary pc-progress__inner" style="width: 67%">
  
  <!-- AFTER -->
  <span class="pc-progress__inner--primary pc-progress__inner" style="width: 66.67%">
</div>

@nhobes nhobes merged commit ec51e49 into petalframework:main May 27, 2024
@nhobes
Copy link
Contributor

nhobes commented May 27, 2024

Sorry for the delay on this one and thanks for contributing, merged!

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.

None yet

2 participants