open class Link : SimplePanel
Link component.
Link(label: String, url: String? = null, icon: String? = null, image: ResString? = null, classes: Set<String> = setOf()) |
var icon: String?
Link icon. |
|
var image: ResString?
Link image. |
|
var label: String
Link label. |
|
var url: String?
Link URL address. |
open fun getSnAttrs(): List<StringPair>
Returns list of element attributes in the form of a List. |
|
open fun onClick(handler: Link.(MouseEvent) -> Unit): Link
A convenient helper for easy setting onClick event handler. |
|
open fun render(): VNode
Renders current component as a Snabbdom vnode. |
open fun add(child: Component): SimplePanel
Adds given component to the current container. |
|
open fun addAll(children: List<Component>): SimplePanel
Adds a list of components to the current container. |
|
fun addInternal(child: Component): SimplePanel
Protected and final method to add given component to the current container. |
|
open fun childrenVNodes(): Array<VNode>
Returns the array of the children Snabbdom vnodes. |
|
open fun getChildren(): List<Component>
Returns a list of children of the current container. |
|
open fun remove(child: Component): SimplePanel
Removes given component from the current container. |
|
open fun removeAll(): SimplePanel
Removes all children from the current container. |
fun Container.link(label: String, url: String? = null, icon: String? = null, image: ResString? = null, classes: Set<String> = setOf(), init: Link.() -> Unit = null): Link
DSL builder extension function. |
|
fun ListTag.linkDisabled(label: String, icon: String? = null, image: ResString? = null, classes: Set<String> = setOf(), init: Link.() -> Unit = null): Link fun DropDown.linkDisabled(label: String, icon: String? = null, image: ResString? = null, classes: Set<String> = setOf(), init: Link.() -> Unit = null): Link
DSL builder extension function for a disabled link in a dropdown list. |