Line data Source code
1 : <template>
2 : <div :class="cn('flex flex-col gap-4 p-4', ui.body)">
3 : <p class="m-0 text-muted-foreground">
4 : {{ translate('autoTopUpOffer.body') }}
5 : </p>
6 : </div>
7 : <div :class="footerBarClass(ui, 'justify-end')">
8 : <button
9 : type="button"
10 : :class="
11 : cn(
12 : buttonVariants({ variant: 'muted-textonly', size: 'lg' }),
13 : ui.secondary
14 : )
15 : "
16 : @click="emit('close')"
17 : >
18 : {{ translate('autoTopUpOffer.notNow') }}
19 : </button>
20 : <AddCreditsBillingLink
21 : :to="setupUrl"
22 : :class="primaryActionClass(ui)"
23 : data-testid="add-credits-auto-top-up-set-up"
24 : @click="emit('setUp')"
25 : >
26 : {{ translate('autoTopUpOffer.setUp') }}
27 : <i class="icon-[lucide--arrow-up-right]" aria-hidden="true" />
28 : </AddCreditsBillingLink>
29 : </div>
30 : </template>
31 :
32 : <script setup lang="ts">
33 : import type { AddCreditsTranslate } from '@comfyorg/account-core/billing'
34 : import { buttonVariants } from '@comfyorg/design-system/button.variants'
35 : import { cn } from '@comfyorg/tailwind-utils'
36 :
37 : import AddCreditsBillingLink from './AddCreditsBillingLink.vue'
38 : import type {
39 : AddCreditsBillingLinkTarget,
40 : AddCreditsUi
41 : } from './addCreditsPresentation'
42 : import { footerBarClass, primaryActionClass } from './addCreditsPresentation'
43 :
44 : const { setupUrl, translate, ui } = defineProps<{
45 : setupUrl: AddCreditsBillingLinkTarget
46 : translate: AddCreditsTranslate
47 : ui: AddCreditsUi
48 : }>()
49 :
50 0 : const emit = defineEmits<{ setUp: []; close: [] }>()
51 : </script>
|