Package-level declarations

Functions

Link copied to clipboard
fun <Value> PreviewLabScope.ChangeEvent(value: Value, title: (Value) -> String, description: (Value) -> String? = { null })
fun <Value> PreviewLabScope.ChangeEvent(value: Value, title: String, description: String? = null)

An effect that calls onEvent to record an event when a value changes. This is useful when you want to monitor a specific value in a Composable, such as a CompositionLocal value.

Link copied to clipboard
fun PreviewLabScope.withEvent(title: String, description: String? = null, block: () -> Unit = {}): () -> Unit
fun <Arg1> PreviewLabScope.withEvent(title: String, description: String? = null, block: (Arg1) -> Unit = {}): (Arg1) -> Unit
fun <Arg1, Arg2> PreviewLabScope.withEvent(title: String, description: String? = null, block: (Arg1, Arg2) -> Unit): (Arg1, Arg2) -> Unit
fun <Arg1, Arg2, Arg3> PreviewLabScope.withEvent(title: String, description: String? = null, block: (Arg1, Arg2, Arg3) -> Unit): (Arg1, Arg2, Arg3) -> Unit

Create a function to record events. This is simply a short-hand for the onEvent call.