MapComplete/UI/Studio/RegisteredTagInput.svelte

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
605 B
Svelte
Raw Normal View History

2023-06-22 15:07:14 +02:00
<script lang="ts">
import EditLayerState from "./EditLayerState";
import {UIEventSource} from "../../Logic/UIEventSource";
import type {TagConfigJson} from "../../Models/ThemeConfig/Json/TagConfigJson";
import TagInput from "./TagInput/TagInput.svelte";
/**
* Thin wrapper around 'TagInput' which registers the output with the state
*/
export let path : (string | number)[]
export let state : EditLayerState
let tag: UIEventSource<TagConfigJson> = new UIEventSource<TagConfigJson>(undefined)
state.register(path, tag)
</script>
<TagInput {tag} />