Skip to content

Commit

Permalink
feat: Add appBackground to CharacterDetail and FavoritesView
Browse files Browse the repository at this point in the history
  • Loading branch information
xramos committed Apr 25, 2024
1 parent 2187994 commit 6984a51
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ struct CharacterDetailView: View {

viewModel.checkIsFavorite()
}
.appBackground()
}
}

Expand Down Expand Up @@ -63,12 +64,16 @@ private extension CharacterDetailView {
VStack(alignment: .center) {

headerView
.background(Colors.neutral)
.clipShape(RoundedRectangle(cornerRadius: Value.cornerRadius, style: .continuous))

Divider()
Spacer().frame(height: 16)

detailView
.background(Colors.neutral)
.clipShape(RoundedRectangle(cornerRadius: Value.cornerRadius, style: .continuous))
}
.padding([.leading, .trailing], Value.paddingLarge)
.padding(Value.paddingLarge)
}
}

Expand All @@ -81,7 +86,7 @@ private extension CharacterDetailView {

CharacterImageView(imageString: viewModel.character.image?.superUrl)
.frame(width: Value.widthLarge, height: Value.heightLarge)
.clipShape(RoundedRectangle(cornerRadius: Value.cornerRadius, style: .circular))
.clipShape(RoundedRectangle(cornerRadius: Value.cornerRadius, style: .continuous))

VStack(alignment: .leading, spacing: Value.spacing) {

Expand Down Expand Up @@ -154,6 +159,7 @@ private extension CharacterDetailView {
value: viewModel.character.deck)
}
}
.padding(5)
}

func titleView(title: String, value: String) -> some View {
Expand Down
2 changes: 2 additions & 0 deletions MyComics/MyComics/Scenes/Favorites/FavoritesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ struct FavoritesView: View {

viewModel.getFavoriteCharacters()
}
.appBackground()
}

@ViewBuilder
Expand All @@ -51,6 +52,7 @@ struct FavoritesView: View {
.buttonStyle(.plain)
}
}
.padding(5)
}
}

Expand Down

0 comments on commit 6984a51

Please sign in to comment.