Slide 20
Slide 20 text
@Composable
fun NewsStory(newsItem: NewsItem) {
val image = +imageResource(newsItem.imageId)
Card(elevation = 2.dp, shape = RoundedCornerShape(4.dp)) {
Column(crossAxisSize = LayoutSize.Expand) {
Container(expanded = true, height = 180.dp) {
DrawImage(image = image)
}
Column(modifier = Spacing(16.dp)) {
Text(text = newsItem.title,
maxLines = 2, overflow = TextOverflow.Ellipsis,
style = (+themeTextStyle { h6 }).withOpacity(0.87f))
Text(text = newsItem.author,
style = (+themeTextStyle { body2 }).withOpacity(0.87f))
}
}
}
} 20