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.

28 lines
606 B

  1. <script lang="ts">
  2. import type { ProjectResult } from "../models/project";
  3. import QlListItem from "./QLListItem.svelte";
  4. export let projects: ProjectResult[];
  5. export let label: string = "";
  6. export let selected: string | null = null;
  7. </script>
  8. {#if projects.length > 0}
  9. <div class="ql-list">
  10. <h2>{label}</h2>
  11. {#each projects as project (project.id)}
  12. <QlListItem selected={project.id === selected} project={project} />
  13. {/each}
  14. </div>
  15. {/if}
  16. <style>
  17. div.ql-list {
  18. margin: 1em 0;
  19. }
  20. h2 {
  21. font-weight: 100;
  22. margin: 0;
  23. padding-bottom: 0.125em;
  24. }
  25. </style>