StatCard.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <LayoutContainer>
  3. <v-row class="card-container">
  4. <v-col cols="3" class="d-flex justify-center align-center small-padding">
  5. <div class="card" :style="{ backgroundColor: backgroundColor }">
  6. <h3 class="chiffre">{{ chiffre }}</h3>
  7. <p>{{ label }}</p>
  8. </div>
  9. </v-col>
  10. </v-row>
  11. </LayoutContainer>
  12. </template>
  13. <script setup>
  14. import { ref, defineProps } from 'vue';
  15. const props = defineProps({
  16. chiffre: String,
  17. label: String,
  18. backgroundColor: {
  19. type: String,
  20. default: '#c3e5e7'
  21. }
  22. });
  23. const backgroundColor = ref(props.backgroundColor);
  24. </script>
  25. <style scoped>
  26. .chiffre {
  27. font-weight: 600;
  28. font-size: 50px;
  29. line-height: 68px;
  30. text-align: center;
  31. color: #091d20;
  32. margin-bottom: 0.5rem;
  33. }
  34. .card-container {
  35. margin-top: 20px;
  36. margin-bottom: 20px;
  37. margin-left: 5rem;
  38. margin-right: 5rem;
  39. }
  40. .card {
  41. background: #c3e5e7;
  42. border-radius: 10px;
  43. padding-left: 5rem;
  44. padding-right: 5rem;
  45. padding-top: 3rem;
  46. padding-bottom: 3rem;
  47. max-width: 15rem;
  48. width: 36rem;
  49. height: 15rem;
  50. display: flex;
  51. flex-direction: column;
  52. justify-content: center;
  53. align-items: center;
  54. text-align: center;
  55. }
  56. </style>