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} : undefined}
/> />
<input {#if expanded}
type="text" <input
bind:this={promptInput} type="text"
bind:value={promptText} bind:this={promptInput}
class="prompt-input" bind:value={promptText}
{placeholder} class="prompt-input"
on:keydown={handleKeyPress} {placeholder}
{disabled} on:keydown={handleKeyPress}
/> {disabled}
/>
{:else}
<span class="spectrum-ActionButton-label ai-gen-text">
{placeholder}
</span>
{/if}
</div> </div>
{#if expanded} {#if expanded}
<div class="action-buttons"> <div class="action-buttons">
@ -267,6 +273,14 @@
cursor: var(--ai-icon-cursor, pointer); 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 { .prompt-input {
font-size: 14px; font-size: 14px;
flex: 1; flex: 1;