OCHistoryCard Composable
The OCHistoryCard
Composable is a component used in Android Jetpack Compose for creating history
cards.
The history card is used to display information about events that took place, e.g. Video
Consultations and Symptom Checks.
The cards includes three text elements:
The date, that the event took place
A Title
A Caption
Additionally the card can show a pill in the top right corner to indicate that the card is new.
The card acts as a button. The whole card is clickable.
Usage
To use the OCHistoryCard
Composable in your Compose project, you need to call it within your
Composable hierarchy.
@Composable
fun OCHistoryCardPreview() {
OCTheme {
OCHistoryCard(
title = "Title",
date = "Date",
caption = "Caption",
pillTitle = "Neu"
) {
// handle card click here
}
}
}
Parameters:
title
: title of history card.
caption
: caption of history card.
date
: date of history card.
pillTitle
: label of the pill showing on history card.
onCardClick
: Whole history card is clickable. Perform necessary action when card is clicked