ChangeYourPaymentPlan.vue
1.12 KB
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
43
44
45
46
47
48
<template>
<VaModal
:mobile-fullscreen="false"
size="small"
max-width="380px"
hide-default-actions
model-value
close-button
@update:modelValue="emits('cancel')"
>
<div class="space-y-6">
<h3>
Are you sure you want to switch to the
<span class="font-bold text-primary">{{ yearlyPlan ? 'monthly' : 'annual' }}</span>
plan?
</h3>
<div class="flex flex-col-reverse md:justify-end md:flex-row md:space-x-4">
<VaButton preset="secondary" color="secondary" @click="emits('cancel')"> Cancel</VaButton>
<VaButton class="mb-4 md:mb-0" @click="confirm()"> Update Plan</VaButton>
</div>
</div>
</VaModal>
</template>
<script lang="ts" setup>
import { useToast } from 'vuestic-ui'
const { init } = useToast()
defineProps({
yearlyPlan: {
type: Boolean,
required: true,
},
})
const emits = defineEmits(['cancel', 'confirm'])
const confirm = () => {
init({ message: "You've successfully changed your payment plan", color: 'success' })
emits('confirm')
}
</script>
<style lang="scss">
.va-modal__inner {
min-width: 326px;
}
</style>