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.

41 lines
825 B

4 years ago
  1. <script>
  2. import ActivityIcon, {iconNames} from "./ActivityIcon.svelte";
  3. export let value;
  4. </script>
  5. <div class="icon-select">
  6. {#each iconNames as iconName (iconName)}
  7. <div class="icon-item" class:selected={value===iconName} on:click={() => value = iconName}>
  8. <ActivityIcon name={iconName} />
  9. </div>
  10. {/each}
  11. </div>
  12. <style>
  13. div.icon-select {
  14. background: #222;
  15. margin: 0;
  16. padding: 0;
  17. border-radius: 0.05em;
  18. margin-bottom: 0.5em;
  19. }
  20. div.icon-item {
  21. display: inline-block;
  22. box-sizing: border-box;
  23. width: calc(100% / 8);
  24. padding: 0.35em 0 0.25em 0;
  25. text-align: center;
  26. cursor: pointer;
  27. }
  28. div.icon-item:hover {
  29. background-color: #292929;
  30. }
  31. div.icon-item.selected {
  32. background-color: rgb(18, 63, 75);
  33. }
  34. div.icon-item.selected:hover {
  35. background-color: rgb(24, 83, 99);
  36. }
  37. </style>