KPContentState

fun KPContentState(content: State.ContentWithLoading, contentLayout: @Composable () -> Unit, loadingIndicatorStyle: LoadingIndicatorStyle = KPLoadingIndicatorStyle)

A composable function for displaying content along with an optional loading indicator. The type of loading indicator is determined by the State.ContentWithLoading.loadingType.

Parameters

content

The State.ContentWithLoading instance containing the content and loading type.

contentLayout

A composable lambda for rendering the content.

loadingIndicatorStyle

Style configuration for the loading indicators. Default is KPLoadingIndicatorStyle.

Supported Loading Types

Example Usage

KPContentState(
content = State.ContentWithLoading(
loadingType = LoadingType.Circular
)
) {
Text("This is the main content.")
}

See also