MapComplete/UI/Studio/SchemaBasedInput.svelte
Pieter Vander Vennet 4c59f4482d Studio: fix presets
2023-06-20 01:32:24 +02:00

17 lines
515 B
Svelte

<script lang="ts">
import type {ConfigMeta} from "./configMeta";
import SchemaBasedField from "./SchemaBasedField.svelte";
import EditLayerState from "./EditLayerState";
import SchemaBasedArray from "./SchemaBasedArray.svelte";
export let schema: ConfigMeta
export let state: EditLayerState
export let path : (string | number)[] = []
</script>
{#if schema.type === "array"}
<SchemaBasedArray {path} {state} {schema}/>
{:else}
<SchemaBasedField {path} {state} {schema}/>
{/if}