petal_components icon indicating copy to clipboard operation
petal_components copied to clipboard

Rounds the width of the progress component to 2 decimal places

Open trentjones21 opened this issue 11 months ago • 0 comments

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>

trentjones21 avatar Mar 27 '24 02:03 trentjones21