Skip to content

Commit

Permalink
Added preview to default paywall
Browse files Browse the repository at this point in the history
  • Loading branch information
NachoSoto committed Jul 31, 2023
1 parent 5fac246 commit 5474042
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions RevenueCatUI/Helpers/PaywallData+Default.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import Foundation
import RevenueCat
import SwiftUI

#if canImport(SwiftUI) && swift(>=5.7)

Expand Down Expand Up @@ -64,4 +65,32 @@ private extension PaywallData {

}

// MARK: -

#if DEBUG

@available(iOS 16.0, macOS 13.0, tvOS 16.0, *)
@available(watchOS, unavailable)
@available(macOS, unavailable)
@available(macCatalyst, unavailable)
struct DefaultPaywall_Previews: PreviewProvider {

static var previews: some View {
PreviewableTemplate(offering: Self.offering) {
MultiPackageBoldTemplate($0)
}
}

static let offering = Offering(
identifier: "offering",
serverDescription: "Main offering",
metadata: [:],
paywall: .default,
availablePackages: TestData.packages
)

}

#endif

#endif

0 comments on commit 5474042

Please sign in to comment.