feat(ui): add InputColor and custom theme

This commit is contained in:
2026-02-09 15:26:18 +01:00
parent 2e6466ceca
commit 64d75b9686
10 changed files with 234 additions and 59 deletions

View File

@@ -1,7 +1,14 @@
<script lang="ts">
import type { NodeInput } from '@nodarium/types';
import { InputCheckbox, InputNumber, InputSelect, InputShape, InputVec3 } from './index';
import {
InputCheckbox,
InputColor,
InputNumber,
InputSelect,
InputShape,
InputVec3
} from './index';
interface Props {
input: NodeInput;
@@ -21,8 +28,15 @@
/>
{:else if input.type === 'shape'}
<InputShape bind:value={value as number[]} />
{:else if input.type === 'color'}
<InputColor bind:value={value as number[]} />
{:else if input.type === 'integer'}
<InputNumber bind:value={value as number} min={input?.min} max={input?.max} step={1} />
<InputNumber
bind:value={value as number}
min={input?.min}
max={input?.max}
step={1}
/>
{:else if input.type === 'boolean'}
<InputCheckbox bind:value={value as boolean} {id} />
{:else if input.type === 'select'}