Cards.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <div class="c-dashoboard-cards--v0">
  3. <div
  4. v-for="(item, index) in items"
  5. :key="index"
  6. class="c-dashoboard-cards--v0__item has-padding"
  7. :style="item.style"
  8. >
  9. <div class="l-flex--row c-dashoboard-cards--v0__header">
  10. <svg-icon
  11. class="c-dashoboard-cards--v0__icon"
  12. :icon-class="item.icon"
  13. />
  14. {{ item.label }}
  15. </div>
  16. <div class="c-dashoboard-cards--v0__value u-bold u-ellipsis u-text--center">{{ item.value }}</div>
  17. </div>
  18. </div>
  19. </template>
  20. <script>
  21. export default {
  22. name: 'Cards',
  23. props: {
  24. items: {
  25. type: Array,
  26. required: true
  27. }
  28. }
  29. }
  30. </script>
  31. <style lang="scss" scoped>
  32. .c-dashoboard-cards--v0 {
  33. display: grid;
  34. grid-template-columns: 1fr 1fr;
  35. grid-gap: $spacing $spacing;
  36. &__item {
  37. min-width: 0;
  38. height: 96px;
  39. background-color: rgba(#060920, 0.3);
  40. }
  41. &__header {
  42. margin-bottom: 10px;
  43. height: 14px;
  44. font-size: 14px;
  45. line-height: 1;
  46. }
  47. &__icon {
  48. margin: 0 8px 2px 0;
  49. font-size: 18px;
  50. }
  51. &__value {
  52. max-width: 100%;
  53. font-size: 40px;
  54. }
  55. }
  56. </style>