Skip to content

Commit

Permalink
Implement post title
Browse files Browse the repository at this point in the history
  • Loading branch information
RenanLukas committed Apr 9, 2024
1 parent 903ca2a commit d64f07e
Showing 1 changed file with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ import org.wordpress.android.ui.compose.unit.Margin

@Composable
fun HorizontalPostListItem(
postTitle: String,
siteName: String,
postDateLine: String,
postTitle: String,
onPostSiteImageClick: () -> Unit,
onPostMoreMenuClick: () -> Unit,
) {
Expand All @@ -46,15 +47,15 @@ fun HorizontalPostListItem(
// Site image
HorizontalPostListItemSiteImage(
modifier = Modifier.padding(
horizontal = Margin.Small.value
end = Margin.Small.value
),
imageUrl = "",
onClick = { onPostSiteImageClick() },
)
// Site name
Text(
modifier = Modifier.weight(1F),
text = postTitle,
text = siteName,
fontSize = 13.sp,
fontWeight = FontWeight.SemiBold,
color = AppColor.Black,
Expand Down Expand Up @@ -98,6 +99,18 @@ fun HorizontalPostListItem(
)
}
}
// Post title
Text(
modifier = Modifier.padding(top = Margin.Medium.value),
text = postTitle,
fontSize = 20.sp,
style = MaterialTheme.typography.titleLarge,
fontWeight = FontWeight.SemiBold,
color = AppColor.Black,
maxLines = 2,
overflow = TextOverflow.Ellipsis,
lineHeight = 25.sp,
)
}
}

Expand All @@ -112,8 +125,9 @@ fun HorizontalPostListItemPreview() {
.fillMaxHeight()
) {
HorizontalPostListItem(
postTitle = "This is a really long post title used for testing",
siteName = "This is a really long site name used for testing",
postDateLine = "1h",
postTitle = "This is a really really really long post title used for testing",
onPostMoreMenuClick = {},
onPostSiteImageClick = {},
)
Expand Down

0 comments on commit d64f07e

Please sign in to comment.