errorstate
Doctor Card Composable
The OCDoctorCard
composable allows you to display essential information about a doctor, including
their name, specialty, address, distance, opening times, and bookmark status.
How to use OCDoctorCard
-
Add the necessary imports:
import your.package.name.OCDoctorCard
-
Use the
OCDoctorCard
within your Composable:
val isBookmarked = remember {
mutableStateOf(false)
}
OCDoctorCard(
"Doctor Name",
"Heart Speciality",
"Noida",
"1024 KM",
"10 am to 9 pm",
isBookmarked = isBookmarked.value,
availabilityIconTintColor = OCColors.green400
onBookmarkClick = {
// hanlde bookmark icon click here
}
)
Parameters:
doctorName
: The name of the doctorspeciality
: The doctor's speciality (optional)address
: The doctor's addressdistance
: The distance to the doctor's location (optional)openingTimes
: The doctor's opening timesisBookmarked
: Indicates whether the doctor is bookmarkedonBookmarkClick
: Callback function for bookmark click (optional)availabilityIconTintColor
: to change availability icon tint color (optional)modifier
: To add further modification to card