mapcomplete/UI/Input/MultiTagInput.ts

21 lines
634 B
TypeScript
Raw Normal View History

import {InputElement} from "./InputElement";
import {UIEventSource} from "../../Logic/UIEventSource";
import {UIElement} from "../UIElement";
import Combine from "../Base/Combine";
import {SubtleButton} from "../Base/SubtleButton";
import TagInput from "./TagInput";
import {FixedUiElement} from "../Base/FixedUiElement";
2020-09-02 11:37:34 +02:00
import {MultiInput} from "./MultiInput";
2020-09-02 11:37:34 +02:00
export class MultiTagInput extends MultiInput<string> {
2020-09-02 11:37:34 +02:00
constructor(value: UIEventSource<string[]> = new UIEventSource<string[]>([])) {
super("Add a new tag",
() => "",
() => new TagInput(),
value
);
}
}