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
Circular: Displays a circular loading indicator using KPCircularLoadingIndicator.
Progressive: Displays a horizontal loading indicator using KPHorizontalLoadingIndicator.
None: No loading indicator is displayed.
Example Usage
KPContentState(
content = State.ContentWithLoading(
loadingType = LoadingType.Circular
)
) {
Text("This is the main content.")
}Content copied to clipboard