IconComponent

open class IconComponent : Component<Unit> , EventProperties<SVGElement>

Class for configuring the appearance of an icon.

An IconDefinitionmust be provided in order to render an icon. This definition wraps the pure SVG markup together with additional properties like the display-name and the viewbox.

In order to provide a comfortable way to use the predefined icons from the dev.fritz2.styling.theme.Theme, use the IconComponent.fromTheme method.

Constructors

IconComponent
Link copied to clipboard
js
fun IconComponent()

Types

Companion
Link copied to clipboard
js
object Companion

Functions

equals
Link copied to clipboard
js
open operator fun equals(other: Any?): Boolean
fromTheme
Link copied to clipboard
js
fun fromTheme(value: Icons.() -> IconDefinition)
hashCode
Link copied to clipboard
js
open fun hashCode(): Int
render
Link copied to clipboard
js
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.
toString
Link copied to clipboard
js
open fun toString(): String

Properties

def
Link copied to clipboard
js
val def: ComponentProperty<IconDefinition?>
displayName
Link copied to clipboard
js
val displayName: ComponentProperty<String?>
events
Link copied to clipboard
js
open override val events: ComponentProperty<WithEvents<SVGElement>.() -> Unit>
This property enables the client to access all events offered by the underlying HTML element.
svg
Link copied to clipboard
js
val svg: ComponentProperty<String?>
viewBox
Link copied to clipboard
js
val viewBox: ComponentProperty<String>