| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- <template>
- <LayoutContainer>
- <v-row class="row-custom">
- <table class="table-comparatif">
- <thead>
- <tr>
- <th class="thead" />
- <th class="thead">
- <p class="standard" :style="{ color: color }">Standard</p>
- <p class="from">À partir de</p>
- <p class="price">
- {{ standardPrice }} <span class="ttc">ttc</span>
- </p>
- <p class="month">/mois</p>
- </th>
- <th class="thead premium-column">
- <p class="standard" :style="{ color: color }">Premium</p>
- <p class="from">À partir de</p>
- <p class="price">
- {{ premiumPrice }} <span class="ttc">ttc</span>
- </p>
- <p class="month">/mois</p>
- </th>
- </tr>
- </thead>
- <tbody class="table-body">
- <tr
- v-for="(row, index) in tableData"
- :key="row.id"
- class="table-row"
- :style="{
- backgroundColor: index % 2 !== 0 ? stripeColor : 'white',
- }"
- >
- <td class="table-data-left">{{ row.column1 }}</td>
- <td class="table-data-second">
- <v-icon
- v-if="row.column2 === 'check'"
- size="18"
- class="far fa-check-circle"
- />
- <v-icon
- v-else-if="row.column2 === 'cross'"
- size="18"
- class="far fa-times-circle"
- color="red"
- />
- <span v-else>{{ row.column2 }}</span>
- </td>
- <td class="table-data-second">
- <v-icon
- v-if="row.column3 === 'check'"
- size="18"
- class="far fa-check-circle"
- />
- <v-icon
- v-else-if="row.column3 === 'cross'"
- size="18"
- class="far fa-times-circle"
- color="red"
- />
- <span v-else>{{ row.column3 }}</span>
- </td>
- </tr>
- </tbody>
- </table>
- </v-row>
- </LayoutContainer>
- </template>
- <script setup>
- import { ref } from "vue";
- const props = defineProps({
- standardPrice: {
- type: String,
- default: "32,90€",
- },
- premiumPrice: {
- type: String,
- default: "46,20€",
- },
- color: {
- type: String,
- default: "#0e2d32",
- },
- stripeColor: {
- type: String,
- default: "rgba(32, 147, 190, 0.2)",
- },
- tableData: {
- type: Array,
- default: () => [],
- },
- });
- </script>
- <style scoped>
- .table-data-second {
- padding-right: 5rem;
- }
- .standard {
- font-family: "Barlow";
- font-style: normal;
- font-weight: 600;
- font-size: 12px;
- line-height: 16px;
- text-align: center;
- letter-spacing: 0.18em;
- text-transform: uppercase;
- color: #0e2d32;
- padding-right: 5rem;
- margin-bottom: 1rem;
- }
- .from,
- .ttc {
- font-family: "Barlow";
- font-style: normal;
- font-weight: 300;
- font-size: 12px;
- line-height: 14px;
- text-align: center;
- color: #454545;
- padding-right: 5rem;
- }
- .ttc {
- text-transform: uppercase;
- }
- .price,
- .month {
- font-family: "Barlow";
- font-style: normal;
- font-weight: 400;
- font-size: 30px;
- line-height: 34px;
- text-align: center;
- color: #454545;
- }
- .month {
- padding-right: 5rem;
- }
- .table-data-left {
- text-align: left;
- padding-left: 20px;
- font-family: "Barlow";
- font-style: normal;
- font-weight: 600;
- font-size: 12px;
- line-height: 16px;
- letter-spacing: 0.18em;
- text-transform: uppercase;
- color: #454545;
- }
- .table-data {
- text-align: left;
- padding-left: 20px;
- font-family: "Barlow";
- font-style: normal;
- font-weight: 600;
- font-size: 12px;
- line-height: 16px;
- letter-spacing: 0.18em;
- text-transform: uppercase;
- color: #454545;
- }
- .thead {
- background-color: #fff;
- height: 8rem;
- font-family: "Barlow";
- font-style: normal;
- font-weight: 400;
- font-size: 30px;
- line-height: 34px;
- }
- .table-comparatif {
- width: 70%;
- margin-top: 1rem;
- margin-right: auto;
- margin-left: auto;
- border: none;
- border-collapse: collapse;
- }
- .table-body .table-row:nth-child(odd) {
- background-color: rgba(190, 32, 77, 0.2);
- }
- </style>
|