Add placeholder as closed text

This commit is contained in:
Adria Navarro 2025-04-17 10:04:39 +02:00
parent ea48fba914
commit acb17112ea
1 changed files with 23 additions and 9 deletions

View File

@ -92,15 +92,21 @@
}
: undefined}
/>
<input
type="text"
bind:this={promptInput}
bind:value={promptText}
class="prompt-input"
{placeholder}
on:keydown={handleKeyPress}
{disabled}
/>
{#if expanded}
<input
type="text"
bind:this={promptInput}
bind:value={promptText}
class="prompt-input"
{placeholder}
on:keydown={handleKeyPress}
{disabled}
/>
{:else}
<span class="spectrum-ActionButton-label ai-gen-text">
{placeholder}
</span>
{/if}
</div>
{#if expanded}
<div class="action-buttons">
@ -267,6 +273,14 @@
cursor: var(--ai-icon-cursor, pointer);
}
.ai-gen-text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
transition: opacity 0.2s ease-out;
margin-right: var(--spacing-xs);
}
.prompt-input {
font-size: 14px;
flex: 1;