DashboardMetricCard.vue 998 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <q-card class="metric-card" flat>
  3. <span class="metric-label">
  4. {{ label }}
  5. </span>
  6. <strong class="metric-value">
  7. {{ value }}
  8. </strong>
  9. <span class="metric-caption">
  10. {{ caption }}
  11. </span>
  12. </q-card>
  13. </template>
  14. <script setup>
  15. defineProps({
  16. label: {
  17. type: String,
  18. required: true,
  19. },
  20. value: {
  21. type: String,
  22. required: true,
  23. },
  24. caption: {
  25. type: String,
  26. default: "",
  27. },
  28. });
  29. </script>
  30. <style scoped lang="scss">
  31. .metric-card {
  32. display: flex;
  33. flex-direction: column;
  34. justify-content: space-between;
  35. gap: 6px;
  36. min-height: 106px;
  37. padding: 16px;
  38. border: 1px solid #d9e3e7;
  39. border-top: 3px solid #b7f35a;
  40. border-radius: 12px;
  41. background: #f0f3f5;
  42. vertical-align: middle;
  43. }
  44. .metric-label {
  45. font-size: 12px;
  46. font-weight: 600;
  47. color: #657177;
  48. }
  49. .metric-value {
  50. font-size: 26px;
  51. line-height: 1.15;
  52. color: #1d2327;
  53. }
  54. .metric-caption {
  55. font-size: 11px;
  56. color: #7b878c;
  57. }
  58. </style>