PopoverComponent

open class PopoverComponent : Component<Unit> , CloseButtonProperty

This class combines the configuration and rendering a popover that floats around a toggle element. The toggle can be any HTMLElement or a fritz2 component. The popover can be containing a header, a content and a footer. All "areas" are optional and it can contain a simple String, a Flow or a RenderContext as well as a fritz2 component. The placement of the popover is configurable.

The popover has a default close-button, which you can hide or you can use your own custom close-button. The toggle element is marked by an arrow, but you can hide the arrow if you want.

Example usage:

popover {
toggle {
icon { fromTheme { arrowForward } }
}
placement { right }
header(flowOf("Our simple Popover"))
content {
div {
text("My Text in a HTMLTag")
}
}
footer("Footer content")
}

Constructors

Link copied to clipboard
fun PopoverComponent()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun content(value: RenderContext.() -> Unit)
fun content(value: String)
fun content(value: Flow<String>)
Link copied to clipboard
fun footer(value: RenderContext.() -> Unit)
fun footer(value: String)
fun footer(value: Flow<String>)
Link copied to clipboard
fun header(value: RenderContext.() -> Unit)
fun header(value: String)
fun header(value: Flow<String>)
Link copied to clipboard
fun placement(value: PopoverPlacements.() -> Style<BasicParams>)
Link copied to clipboard
open override fun render(    context: RenderContext,     styling: BoxParams.() -> Unit,     baseClass: StyleClass,     id: String?,     prefix: String)

Central method that should do the actual rendering of a component.

Properties

Link copied to clipboard
val arrowPlacement: ComponentProperty<PopoverArrowPlacements.() -> Style<BasicParams>>
Link copied to clipboard
open override val closeButtonIcon: ComponentProperty<Icons.() -> IconDefinition>
Link copied to clipboard
open override val closeButtonPrefix: String
Link copied to clipboard
open override val closeButtonRendering: ComponentProperty<RenderContext.() -> DomListener<MouseEvent, HTMLElement>>
Link copied to clipboard
open override val closeButtonStyle: ComponentProperty<Style<BasicParams>>
Link copied to clipboard
val closeOnBlur: ComponentProperty<Boolean>
Link copied to clipboard
val closeOnEscape: ComponentProperty<Boolean>
Link copied to clipboard
val hasArrow: ComponentProperty<Boolean>
Link copied to clipboard
open override val hasCloseButton: ComponentProperty<Boolean>
Link copied to clipboard
val size: ComponentProperty<PopoverSizes.() -> Style<BasicParams>>
Link copied to clipboard
val toggle: ComponentProperty<RenderContext.() -> Unit?>