Line data Source code
1 : <template>
2 : <a
3 0 : v-if="typeof to === 'string'"
4 : :href="to"
5 : target="_blank"
6 : :rel
7 : :class="inline && INLINE"
8 : >
9 : <slot />
10 : </a>
11 : <button
12 : v-else
13 : type="button"
14 : :class="
15 : inline &&
16 : cn(
17 : INLINE,
18 : 'cursor-pointer appearance-none border-none bg-transparent p-0 font-[inherit]'
19 : )
20 : "
21 : >
22 : <slot />
23 : </button>
24 : </template>
25 :
26 : <script setup lang="ts">
27 : import { cn } from '@comfyorg/tailwind-utils'
28 :
29 : import type { AddCreditsBillingLinkTarget } from './addCreditsPresentation'
30 :
31 : const {
32 : to,
33 : rel = 'noopener',
34 : inline = false
35 : } = defineProps<{
36 : to: AddCreditsBillingLinkTarget
37 : rel?: string
38 : inline?: boolean
39 : }>()
40 :
41 2356 : const INLINE = 'text-inherit underline'
42 : </script>
|