[ref] input to components

This commit is contained in:
kwaroran
2023-07-18 18:18:14 +09:00
parent 26421fde03
commit c0622c4f0d
24 changed files with 291 additions and 161 deletions

View File

@@ -4,6 +4,7 @@
import { DataBase, changeToPreset, copyPreset, downloadPreset, importPreset, presetTemplate } from "../../ts/storage/database";
import { CopyIcon, DownloadIcon, EditIcon, FolderUpIcon, PlusIcon, TrashIcon, XIcon } from "lucide-svelte";
import { cloneDeep } from "lodash";
import TextInput from "../UI/GUI/TextInput.svelte";
let editMode = false
export let close = () => {}
@@ -28,7 +29,7 @@
}
}} class="flex items-center text-neutral-200 border-t-1 border-solid border-0 border-gray-600 p-2 cursor-pointer" class:bg-selected={i === $DataBase.botPresetsId}>
{#if editMode}
<input class="text-neutral-200 p-2 bg-transparent input-text focus:bg-selected" bind:value={$DataBase.botPresets[i].name} placeholder="string">
<TextInput bind:value={$DataBase.botPresets[i].name} placeholder="string" padding={false}/>
{:else}
{#if i < 9}
<span class="w-2 text-center mr-2 text-gray-400">{i + 1}</span>