feat: some moving around

This commit is contained in:
2024-04-15 22:13:43 +02:00
parent 0254bc1ae5
commit dec205b234
86 changed files with 505 additions and 409 deletions

View File

@ -1,7 +0,0 @@
import { describe, it, expect } from 'vitest';
describe('sum test', () => {
it('adds 1 + 2 to equal 3', () => {
expect(1 + 2).toBe(3);
});
});

View File

@ -8,14 +8,15 @@
export let input: NodeInput;
export let value: any;
export let id: string;
</script>
{#if input.type === "float"}
<Float bind:value />
<Float {id} bind:value />
{:else if input.type === "integer"}
<Integer bind:value />
<Integer {id} bind:value />
{:else if input.type === "boolean"}
<Checkbox bind:value />
<Checkbox {id} bind:value />
{:else if input.type === "select"}
<Select bind:value labels={input.labels} />
<Select {id} bind:value labels={input.labels} />
{/if}

View File

@ -1,8 +1,10 @@
<script lang="ts">
export let value: boolean;
export let id: string;
</script>
<input type="checkbox" bind:checked={value} />
<input {id} type="checkbox" bind:checked={value} />
<style>
input[type="checkbox"] {

View File

@ -3,9 +3,10 @@
export let min = 0;
export let max = 10;
export let step = 0.1;
export let id: string;
</script>
<input type="number" bind:value {min} {max} {step} />
<input {id} type="number" bind:value {min} {max} {step} />
<style>
input {

View File

@ -3,9 +3,10 @@
export let min = 0;
export let max = 10;
export let step = 1;
export let id: string;
</script>
<input type="number" bind:value {min} {max} {step} />
<input {id} type="number" bind:value {min} {max} {step} />
<style>
input {

View File

@ -1,9 +1,10 @@
<script lang="ts">
export let labels: string[] = [];
export let value: number = 0;
export let id: string;
</script>
<select bind:value>
<select {id} bind:value>
{#each labels as label, i}
<option value={i}>{label}</option>
{/each}