package pl.treksoft.kvision import pl.treksoft.kvision.basic.Label import pl.treksoft.kvision.core.Container import pl.treksoft.kvision.core.Img import pl.treksoft.kvision.core.KVManager import pl.treksoft.kvision.core.Root import pl.treksoft.kvision.dropdown.DropDown import pl.treksoft.kvision.html.* import pl.treksoft.kvision.html.TAG.H1 import pl.treksoft.kvision.routing.routing class Showcase : ApplicationBase() { override fun start(state: Map) { val root = Root("showcase") val container = Container(setOf("abc", "def")) val h1 = Tag(H1, "To jest test pisania tekstu", false, ALIGN.NONE, classes = setOf("test", "test2")) container.add(h1) val label = Label("KVLabel1") container.add(label) val label2 = Label("KVLabel2") container.add(label2) root.add(container) label.hide() label.show() val dd = DropDown("Dropdown", listOf("DAsdasd asdasdas das", "dasdasd asdasdas das"), "flag") root.add(dd) val p = Tag(TAG.P, "To jest prawo", align = ALIGN.RIGHT) p.title = "Tytuł" root.add(p) val del = Tag(TAG.DEL, "To jest deleted") root.add(del) val list = ListTag(LIST.DL_HORIZ, listOf("abc", "defdasdasdasddasdtdasdas", "Dasdsada", "dasdasdads"), true) root.add(list) val img = Image(Img("kotlin.png"), "Image", true, IMAGE_SHAPE.ROUNDED) root.add(img) val button = Button("To jest przycisk FA", "fa-flag", BUTTON_STYLE.DANGER) button.setEventListener