refactor: use tailwind custom colors for themes

Use tailwind v4 @theme block so we can use bg-layer-0 instead of
bg-[--layer-0] for theme colors.
This commit is contained in:
Max Richter
2026-02-03 12:16:12 +01:00
parent 89e4cf8364
commit b19da950a6
35 changed files with 379 additions and 375 deletions

View File

@@ -1,7 +1,7 @@
<script lang="ts">
import type { NodeInput } from '@nodarium/types';
import { Checkbox, Float, Select, Vec3 } from './index.js';
import { InputCheckbox, InputNumber, InputSelect, InputVec3 } from './index';
interface Props {
input: NodeInput;
@@ -13,18 +13,18 @@
</script>
{#if input.type === 'float'}
<Float
<InputNumber
bind:value={value as number}
min={input?.min}
max={input?.max}
step={input?.step}
/>
{:else if input.type === 'integer'}
<Float bind:value={value as number} min={input?.min} max={input?.max} />
<InputNumber bind:value={value as number} min={input?.min} max={input?.max} step={1} />
{:else if input.type === 'boolean'}
<Checkbox bind:value={value as boolean} {id} />
<InputCheckbox bind:value={value as boolean} {id} />
{:else if input.type === 'select'}
<Select bind:value={value as number} options={input.options} {id} />
<InputSelect bind:value={value as number} options={input.options} {id} />
{:else if input.type === 'vec3'}
<Vec3 bind:value={value as [number, number, number]} {id} />
<InputVec3 bind:value={value as [number, number, number]} {id} />
{/if}