ifPresent

open fun <T : Any> ifPresent(value: T?, consumer: ComponentBuilder.(T) -> Unit): ComponentBuilder

Applies styling if the given value is not null.

Return

this component builder for chaining

Parameters

value

the value to check

consumer

the action to apply if value is not null

Type Parameters

T

the type of value