Slide 44
Slide 44 text
© ZOZO, Inc.
44
@Composable
fun EventComponents(
modifier: Modifier = Modifier,
view: View = View.EventCard,
thumbnail: Painter = EmptyPainter(),
title: String = "",
description: String = "",
onTapped: () -> Unit = {},
onMenuTapped: () -> Unit = {}
) {
when (view) {
View.EventCard -> TopLevelViewEventCard(
onTapped = onTapped,
modifier = modifier
) {
ThumbnailViewEventCard(thumbnail = thumbnail)
TitleViewEventCard(title = title)
DescriptionViewEventCard(description = description)
}
View.ListItem -> TopLevelViewListItem(
onTapped = onTapped,
modifier = modifier
) {
ThumbnailViewListItem(thumbnail = thumbnail)
TextsViewListItem {
TitleViewListItem(title = title)
DescriptionViewListItem(description = description)
OptionsViewListItem {
OptionViewListItem(onMenuTapped = onMenuTapped)
}
}
}
}
}