Line data Source code
1 16 : <template>
2 26 : <div
3 : class="flex flex-col border-t p-4 text-sm/5 wrap-break-word text-muted-foreground"
4 : >
5 : <p
6 : v-if="promptTextReal"
7 : :class="cn('m-0', preserveNewlines && 'whitespace-pre-line')"
8 : >
9 : {{ promptTextReal }}
10 : </p>
11 : </div>
12 : </template>
13 : <script setup lang="ts">
14 : import { computed, toValue } from 'vue'
15 : import type { MaybeRefOrGetter } from 'vue'
16 :
17 : import { cn } from '@comfyorg/tailwind-utils'
18 :
19 : const { promptText, preserveNewlines = false } = defineProps<{
20 : promptText?: MaybeRefOrGetter<string>
21 : preserveNewlines?: boolean
22 : }>()
23 :
24 26 : const promptTextReal = computed(() => toValue(promptText))
25 : </script>
|