Added Editing of Questions

This commit is contained in:
2026-01-02 18:00:57 +01:00
parent 5568a5bb99
commit 48074f7603
23 changed files with 1095 additions and 71 deletions

View File

@@ -1,24 +1,36 @@
<script lang="ts">
import type { HTMLInputTypeAttribute } from "svelte/elements";
interface Props {
value: string;
value: any;
label?: string;
type?: HTMLInputTypeAttribute;
readonly?: boolean;
class?: string;
}
let { value = $bindable(), label }: Props = $props();
let {
value = $bindable(),
label,
type = "text",
readonly = false,
class: className
}: Props = $props();
const id = crypto.randomUUID();
</script>
<div>
<div class="w-full grow">
{#if label}
<label for="textfield-{id}" class="">{label}</label>
{/if}
<div>
<input
type="text"
{type}
{readonly}
name="textfield"
id="textfield-{id}"
class="borders mt-2 mb-2 w-full"
class="borders mt-2 mb-2 w-full {className}"
bind:value
/>
</div>