feat: add text and date draw tools

This commit is contained in:
2026-08-26 05:43:03 +05:00
parent 38e7cd20d2
commit 54af7626d6
9 changed files with 304 additions and 19 deletions
+8
View File
@@ -75,6 +75,14 @@
pipetteActive={pipetteTargetId === param.id}
onPipetteToggle={() => onPipetteToggle?.(param.id)}
/>
{:else if param.type === 'text'}
<TextField
id={param.id}
label={paramLabel(tool, param)}
type="text"
placeholder={param.placeholder}
bind:value={values[param.id]}
/>
{/if}
</div>
{/each}
+11 -2
View File
@@ -10,11 +10,20 @@
max?: number;
step?: number;
hint?: string;
placeholder?: string;
}
let { id, label, value = $bindable(''), type = 'text', min, max, step, hint }: Props = $props();
let { id, label, value = $bindable(''), type = 'text', min, max, step, hint, placeholder }: Props =
$props();
</script>
<Field {id} {label} {hint}>
<input class="control" {id} {type} min={min} max={max} step={step} bind:value />
<input class="control" {id} {type} min={min} max={max} step={step} {placeholder} bind:value />
</Field>
<style>
input.control::placeholder {
color: var(--text-muted);
opacity: 0.7;
}
</style>