|
|
@@ -8,7 +8,7 @@ struct PaywallView: View {
|
|
|
GeometryReader { geometry in
|
|
|
let metrics = PaywallLayoutMetrics(size: geometry.size)
|
|
|
|
|
|
- ZStack(alignment: .topTrailing) {
|
|
|
+ ZStack {
|
|
|
AppTheme.background
|
|
|
.ignoresSafeArea()
|
|
|
|
|
|
@@ -24,31 +24,12 @@ struct PaywallView: View {
|
|
|
.padding(.top, metrics.topInset)
|
|
|
.padding(.bottom, metrics.bottomInset)
|
|
|
.frame(width: geometry.size.width, height: geometry.size.height, alignment: .top)
|
|
|
-
|
|
|
- closeButton
|
|
|
- .padding(metrics.closeButtonPadding)
|
|
|
}
|
|
|
}
|
|
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
|
.ignoresSafeArea()
|
|
|
}
|
|
|
|
|
|
- private var closeButton: some View {
|
|
|
- Button(action: onDismiss) {
|
|
|
- Image(systemName: "xmark")
|
|
|
- .font(.system(size: 12, weight: .semibold))
|
|
|
- .foregroundStyle(AppTheme.textSecondary)
|
|
|
- .frame(width: 32, height: 32)
|
|
|
- .background(AppTheme.cardBackground)
|
|
|
- .clipShape(Circle())
|
|
|
- .overlay(
|
|
|
- Circle()
|
|
|
- .stroke(AppTheme.cardBorder, lineWidth: 1)
|
|
|
- )
|
|
|
- }
|
|
|
- .buttonStyle(.plain)
|
|
|
- }
|
|
|
-
|
|
|
private func header(metrics: PaywallLayoutMetrics) -> some View {
|
|
|
VStack(spacing: metrics.headerSpacing) {
|
|
|
Text(PaywallContent.title)
|
|
|
@@ -171,7 +152,6 @@ private struct PaywallLayoutMetrics {
|
|
|
var horizontalInset: CGFloat { size.width * 0.06 }
|
|
|
var topInset: CGFloat { size.height * 0.11 }
|
|
|
var bottomInset: CGFloat { size.height * 0.05 }
|
|
|
- var closeButtonPadding: CGFloat { max(16, size.width * 0.02) }
|
|
|
|
|
|
var sectionSpacing: CGFloat { size.height * 0.04 }
|
|
|
var headerSpacing: CGFloat { size.height * 0.012 }
|