icon
fun RenderContext.icon( styling: BasicParams.() -> Unit = {}, baseClass: StyleClass = StyleClass.None, id: String? = null, prefix: String = IconComponent.prefix, build: IconComponent.() -> Unit = {})
Content copied to clipboard
This component enables to render an icon. It basically wraps raw SVG images into a nicer API.
fritz2's default theme offers some basic predefined icons, have a look at dev.fritz2.styling.theme.Theme.icons.
Every icon must be wrapped inside an IconDefinition, that acts as a value class for the raw SVG markup. Such a definition is implicitly set by using the `fromTheme` configuration function:
Basic Usage
icon { fromTheme { fritz2 } }
// ^^^^^^^^^
convenient function for easily set the predefined icons from the themeContent copied to clipboard
See also
Parameters
styling
a lambda expression for declaring the styling as fritz2's styling DSL
base Class
optional CSS class that should be applied to the element
id
the ID of the element
prefix
the prefix for the generated CSS class resulting in the form `$prefix-$hash`
build
a lambda expression for setting up the component itself. Details in IconComponent