All files / Pages/Prompts Create.vue

100% Statements 2/2
100% Branches 6/6
100% Functions 0/0
100% Lines 2/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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          1x                   1x                                  
<script setup>
import { Head } from '@inertiajs/vue3';
 
import PromptForm from '../../Components/PromptForm.vue';
 
const PLACEHOLDER = '{{variable}}';
 
defineProps({
    initial: { type: Object, required: true },
    suggestedTags: { type: Array, required: true },
});
</script>
 
<template>
    <Head title="New Prompt" />
    <div class="mx-auto max-w-2xl">
        <h1 class="mb-1 text-xl font-semibold tracking-tight">New prompt</h1>
        <p class="mb-5 text-sm text-slate-500">
            Use
            <code class="rounded bg-slate-100 px-1 py-0.5 text-xs">{{ PLACEHOLDER }}</code>
            placeholders and fill them in later.
        </p>
        <PromptForm
            :initial="initial"
            :suggested-tags="suggestedTags"
            method="post"
            action="/prompts"
            submit-label="Create prompt"
            cancel-href="/prompts"
        />
    </div>
</template>