Stat.vue 788 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <div class="card" :style="{ backgroundColor: props.backgroundColor }">
  3. <h3 class="chiffre">
  4. {{ props.chiffre }}
  5. </h3>
  6. <p>{{ props.text }}</p>
  7. </div>
  8. </template>
  9. <script setup>
  10. const props = defineProps({
  11. chiffre: {
  12. type:String,
  13. default: 'XXX',
  14. },
  15. text: {
  16. type: String,
  17. default: 'Texte par défaut',
  18. },
  19. backgroundColor: {
  20. type: String,
  21. default: '#fac20a',
  22. },
  23. });
  24. </script>
  25. <style scoped>
  26. .card {
  27. border-radius: 10px;
  28. width: 36rem;
  29. height: 15rem;
  30. display: flex;
  31. flex-direction: column;
  32. justify-content: center;
  33. align-items: center;
  34. text-align: center;
  35. }
  36. .chiffre {
  37. font-weight: 600;
  38. font-size: 60px;
  39. line-height: 68px;
  40. text-align: center;
  41. color: #091d20;
  42. margin-bottom: 0.5rem;
  43. }
  44. </style>