OkCancelModal

class OkCancelModal(ctx: Ctx<OkCancelModal.Props>) : FadingModal<OkCancelModal.Props>

Constructors

Link copied to clipboard
fun OkCancelModal(ctx: Ctx<OkCancelModal.Props>)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class Props(    val handle: ModalsManager.Handle,     val transition: FadingModal.Transition = Transition(),     val view: OkCancelModal.View,     val onResult: (OkCancelModal.Result) -> Unit) : FadingModal.Props
Link copied to clipboard
enum Result : Enum<OkCancelModal.Result>
Link copied to clipboard
data class View(    val appearance: SemanticTag.() -> SemanticTag,     val header: RenderFn,     val content: RenderFn,     val okText: RenderFn,     val cancelText: RenderFn)

Functions

Link copied to clipboard
open fun close()
Link copied to clipboard
fun <C : Component<*>> createRef(): ComponentRef.Tracker<C>
Link copied to clipboard
operator fun <T> Stream<T>.invoke(handler: (T) -> Unit): () -> Unit

Subscribes to a Stream.

Link copied to clipboard
open override fun onMount()

Called when the component is mounted

Link copied to clipboard
open fun onNextProps(newProps: OkCancelModal.Props, previousProps: OkCancelModal.Props)

Called when the component is about to receive new props.

Link copied to clipboard
open fun onUnmount()

Called when the component was removed from the dom

Link copied to clipboard
open fun onUpdate()

Called when the dom was updated. This is called after the render cycle.

Link copied to clipboard
override fun VDom.render()

Every component needs to implement this method

Link copied to clipboard
open override fun FlowContent.renderContent()
Link copied to clipboard
open fun shouldRedraw(nextProps: OkCancelModal.Props): Boolean

Returns 'true' when the component should redraw.

Link copied to clipboard
fun <T> stream(    initial: T,     config: Stream<T>.() -> Stream<T>? = null,     handler: (T) -> Unit = {}): ObservableStreamProperty<T>

Creates a property that is backed by a StreamSource

Link copied to clipboard
fun <T> subscribingTo(stream: Stream<T>, onNext: (T) -> Unit? = null): ReadOnlyProperty<Any?, T>

Creates a property that is subscribed to a stream.

Link copied to clipboard
fun triggerRedraw()

Triggers a redraw

Link copied to clipboard
fun <T> value(initial: T, onChange: (T) -> Unit? = null): ObservableComponentProperty<T>

Creates a read write property for the components state.

Properties

Link copied to clipboard
val attributes: MutableTypedAttributes

The attributes of the component

Link copied to clipboard
val ctx: Ctx<OkCancelModal.Props>
Link copied to clipboard
val dom: HTMLElement?

The Dom node to which the component is rendered

Link copied to clipboard
val parent: Component<*>?

Accessor for the parent component

Link copied to clipboard
val props: OkCancelModal.Props

Public getter for the Props

Link copied to clipboard
val view: OkCancelModal.View