/
CreditCardItem.vue
42 lines (38 loc) · 1.32 KB
/
CreditCardItem.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright (C) 2024 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<v-card border class="mb-6 py-2">
<v-card-item>
<v-row class="align-center justify-space-between ma-0">
<v-col class="pa-0">
<v-row class="align-center ma-0">
<v-chip rounded class="text-capitalize font-weight-bold">{{ card.brand }}</v-chip>
<v-chip v-if="card.isDefault" color="info" rounded class="text-capitalize font-weight-bold ml-2">Default</v-chip>
</v-row>
<v-card-text class="font-weight-bold px-0">**** **** **** {{ card.last4 }}</v-card-text>
<v-card-text class="font-weight-bold pa-0">{{ card.expMonth }}/{{ card.expYear }}</v-card-text>
</v-col>
<v-radio v-if="selectable" class="flex-0-0" :value="card.id" />
</v-row>
</v-card-item>
</v-card>
</template>
<script setup lang="ts">
import {
VCol,
VRow,
VCard,
VCardItem,
VCardText,
VChip,
VRadio,
} from 'vuetify/components';
import { CreditCard } from '@/types/payments';
const props = withDefaults(defineProps<{
card: CreditCard
selectable?: boolean
}>(), {
card: () => new CreditCard(),
selectable: false,
});
</script>