Skip to content

Commit 97f3447

Browse files
committed
feat: support placeholder
1 parent 53d1f39 commit 97f3447

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/PromptEditor.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ defineOptions({
1313
})
1414
1515
const props = withDefaults(defineProps<{
16+
placeholder?: string
1617
themes?: MaybeArray<ThemeRegistrationAny>
1718
}>(), {
19+
placeholder: 'AI prompt',
1820
themes: () => [catppuccinLatte, catppuccinMocha],
1921
})
2022
@@ -70,7 +72,8 @@ onBeforeUnmount(() => {
7072
<div class="[&>.shiki]:p-4 [&>.shiki]:min-h-16" v-html="output" />
7173
<textarea
7274
v-model="model"
73-
class="absolute focus-within:outline-none inset-0 top-0 left-0 p-4 text-transparent bg-transparent caret-black resize-none overflow-hidden z-10"
75+
:placeholder="placeholder"
76+
class="absolute focus-within:outline-none inset-0 top-0 left-0 p-4 text-transparent bg-transparent caret-black resize-none overflow-hidden z-10 placeholder:text-gray-500/40"
7477
autocapitalize="off"
7578
autocomplete="off"
7679
autocorrect="off"

0 commit comments

Comments
 (0)