Plan stuff. Log stuff.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
423 B

  1. <script>
  2. import pluralize from "pluralize";
  3. import ActivityIcon from "./ActivityIcon.svelte";
  4. export let amount = 0
  5. export let subActivity = null
  6. </script>
  7. {#if subActivity != null}
  8. <span>{amount} {pluralize(subActivity.unitName, amount)}</span>
  9. {:else}
  10. <span class="unknown">{amount} (unknown unit)</span>
  11. {/if}
  12. <style>
  13. span {
  14. display: inline-block;
  15. }
  16. span.unknown {
  17. color: #555;
  18. }
  19. </style>