Stat.vue 870 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. import { defineProps } from 'vue'
  11. const props = defineProps({
  12. chiffre: {
  13. type:String,
  14. default: 'XXX',
  15. },
  16. text: {
  17. type: String,
  18. default: 'Texte par défaut',
  19. },
  20. backgroundColor: {
  21. type: String,
  22. default: '#fac20a',
  23. },
  24. });
  25. </script>
  26. <style scoped>
  27. .card {
  28. border-radius: 10px;
  29. width: 36rem;
  30. height: 15rem;
  31. display: flex;
  32. flex-direction: column;
  33. justify-content: center;
  34. align-items: center;
  35. text-align: center;
  36. }
  37. .chiffre {
  38. font-family: "Barlow";
  39. font-style: normal;
  40. font-weight: 600;
  41. font-size: 60px;
  42. line-height: 68px;
  43. text-align: center;
  44. color: #091d20;
  45. margin-bottom: 0.5rem;
  46. }
  47. </style>