Skip to content

Commit

Permalink
Paywalls: updated multi-package bold template design (#2908)
Browse files Browse the repository at this point in the history
Added new border around unselected packages.
(Note that the test snapshots don't included blurred background)

![simulator_screenshot_BF1077DF-9976-4404-9AFB-9A45798CC619](https://github.com/RevenueCat/purchases-ios/assets/685609/f78245d3-ee8a-4afa-8674-12ab9698bd3f)
  • Loading branch information
NachoSoto committed Aug 17, 2023
1 parent 98061cd commit e51952f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion RevenueCatUI/Templates/MultiPackageBoldTemplate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,16 @@ private struct MultiPackageTemplateContent: View {
.multilineTextAlignment(.leading)
.frame(maxWidth: .infinity, alignment: alignment)
.foregroundColor(self.configuration.colors.foregroundColor)
.overlay {
if selected {
EmptyView()
} else {
RoundedRectangle(cornerRadius: Self.cornerRadius)
.stroke(self.configuration.colors.foregroundColor, lineWidth: 2)
}
}
.background {
RoundedRectangle(cornerRadius: 15, style: .continuous)
RoundedRectangle(cornerRadius: Self.cornerRadius, style: .continuous)
.foregroundColor(
selected
? Self.selectedBackgroundColor
Expand Down Expand Up @@ -203,6 +211,7 @@ private struct MultiPackageTemplateContent: View {
}

private static let iconSize: CGFloat = 100
private static let cornerRadius: CGFloat = 15

#if !os(macOS) && !os(watchOS)
private static let selectedBackgroundColor: Color = .init(
Expand Down

0 comments on commit e51952f

Please sign in to comment.