Skip to main content
Version: 12.10.0

OCStatusCard Composable

The OCStatusCard Composable is a component used in Android Jetpack Compose for creating status cards. It is used to indicate the status of either a challenge or a whole health goal. The appearance of the card varies based on the state of status it represents.

Card State:

  • Success
  • Pending
  • Failed

Usage

To use the OCStatusCard Composable in your Compose project, you need to call it within your Composable hierarchy. You can customize the appearance and behavior of the card by passing appropriate parameters.


@Composable
fun OCStatusCardSuccessPreview() {
OCTheme {
OCStatusCard(
title = " Title",
description = "Paragraph text goes here",
buttonText = "Button",
cardState = Success,
){
// handle button click here
}
}
}

Parameters:

  • title : Title of the status card
  • description : Description of the status card
  • buttonText : Text for the button
  • modifier: An optional Modifier to customize the appearance of the card.
  • cardState : State of the status card.
  • onCardClick : click of the button