rename vars

This commit is contained in:
Peter Clement 2025-05-06 11:23:32 +01:00
parent 7753c44ef1
commit e746595ea4
1 changed files with 5 additions and 4 deletions

View File

@ -10,8 +10,8 @@
export let bindings: EnrichedBinding[] = []
export let value: string | null = ""
export let expandedOnly: boolean = false
export let parentWidth: number | null = null
const dispatch = createEventDispatcher<{
update: { code: string }
accept: void
@ -26,10 +26,11 @@
const thresholdExpansionWidth = 350
$: isExpandedOnly =
$: expandedOnly =
expandedOnly ||
(parentWidth !== null && parentWidth > thresholdExpansionWidth)
$: expanded = isExpandedOnly || expanded
$: expanded = expandedOnly || expanded
async function generateJs(prompt: string) {
promptText = ""
@ -107,7 +108,7 @@
bind:expanded
bind:value={inputValue}
readonly={!!suggestedCode}
expandedOnly={isExpandedOnly}
{expandedOnly}
/>
</div>