Skip to content

Commit

Permalink
Merge pull request #89 from gabrielbmoro/feature/details-fix-margin-s…
Browse files Browse the repository at this point in the history
…paces

fix(details): Fix spacing issue in GenresCard component
  • Loading branch information
gabrielbmoro committed Oct 15, 2023
2 parents a0e4762 + 165996e commit 71ab30d
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,24 @@ import com.gabrielbmoro.moviedb.core.ui.theme.ThemePreviews
fun GenresCard(genres: List<String>, modifier: Modifier = Modifier) {
FlowRow(
modifier = modifier,
horizontalArrangement = Arrangement.spacedBy(5.dp),
horizontalArrangement = Arrangement.spacedBy(8.dp),
maxItemsInEachRow = 4
) {
genres.forEach {
Card(
shape = CircleShape,
modifier = Modifier.padding(vertical = 4.dp),
colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.secondary)
) {
Text(
text = it,
style = MaterialTheme.typography.labelMedium.copy(
style = MaterialTheme.typography.labelLarge.copy(
color = MaterialTheme.colorScheme.secondaryContainer
),
modifier = Modifier.padding(horizontal = 8.dp, vertical = 2.dp)
modifier = Modifier.padding(
horizontal = 8.dp,
vertical = 4.dp
)
)
}
}
Expand All @@ -49,6 +53,9 @@ fun GenresCardPreview() {
"Action",
"Drama",
"Comedy",
"Terror",
"Drama",
"Comedy",
"Terror"
)
)
Expand Down

0 comments on commit 71ab30d

Please sign in to comment.