chore: setup linting
This commit is contained in:
@@ -1,25 +1,30 @@
|
||||
<script lang="ts">
|
||||
import type { NodeInput } from '@nodarium/types';
|
||||
import type { NodeInput } from '@nodarium/types';
|
||||
|
||||
import { Checkbox, Number, Select, Vec3 } from './index.js';
|
||||
import { Checkbox, Float, Select, Vec3 } from './index.js';
|
||||
|
||||
interface Props {
|
||||
input: NodeInput;
|
||||
value: any;
|
||||
id?: string;
|
||||
}
|
||||
interface Props {
|
||||
input: NodeInput;
|
||||
value: unknown;
|
||||
id?: string;
|
||||
}
|
||||
|
||||
let { input, value = $bindable(), id }: Props = $props();
|
||||
let { input, value = $bindable(), id }: Props = $props();
|
||||
</script>
|
||||
|
||||
{#if input.type === 'float'}
|
||||
<Number bind:value min={input?.min} max={input?.max} step={input?.step} />
|
||||
<Float
|
||||
bind:value={value as number}
|
||||
min={input?.min}
|
||||
max={input?.max}
|
||||
step={input?.step}
|
||||
/>
|
||||
{:else if input.type === 'integer'}
|
||||
<Number bind:value min={input?.min} max={input?.max} />
|
||||
<Float bind:value={value as number} min={input?.min} max={input?.max} />
|
||||
{:else if input.type === 'boolean'}
|
||||
<Checkbox bind:value {id} />
|
||||
<Checkbox bind:value={value as boolean} {id} />
|
||||
{:else if input.type === 'select'}
|
||||
<Select bind:value options={input.options} {id} />
|
||||
<Select bind:value={value as number} options={input.options} {id} />
|
||||
{:else if input.type === 'vec3'}
|
||||
<Vec3 bind:value {id} />
|
||||
<Vec3 bind:value={value as [number, number, number]} {id} />
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user