Improved the overall layout of the FeedItemCell component in the Feed framework.

This commit is contained in:
Javier Cicchelli 2024-03-20 01:34:54 +01:00
parent 5b1ca622b7
commit 2da8f417c4

View File

@ -29,11 +29,12 @@ struct FeedItemCell: View {
alignment: .bottom, alignment: .bottom,
spacing: 8 spacing: 8
) { ) {
Image(systemName: "person.crop.circle") Image.Icon.person
Text(item.author) Text(item.author)
.font(.subheadline) .font(.body)
} }
.foregroundColor(.secondary)
VStack(spacing: 8) { VStack(spacing: 8) {
Text(item.title) Text(item.title)
@ -48,24 +49,26 @@ struct FeedItemCell: View {
} }
.multilineTextAlignment(.leading) .multilineTextAlignment(.leading)
HStack(alignment: .bottom) { HStack(
alignment: .center,
spacing: 32
) {
StarRating( StarRating(
item.rating.stars, item.rating.stars,
of: .Rating.total of: .Rating.total
) )
Spacer()
HStack( HStack(
alignment: .bottom, alignment: .center,
spacing: 4 spacing: 8
) { ) {
Text(item.rating.appVersion) Image.Icon.info
Image(systemName: "iphone.gen3.circle") Text(item.rating.appVersion)
.font(.body)
} }
.foregroundColor(.secondary)
} }
.font(.subheadline)
} }
.padding(.vertical, 8) .padding(.vertical, 8)
} }