Files
purchases-ios/RevenueCatUI/Modifiers/ViewExtensions.swift
T
NachoSoto 4e07e012da Paywalls: determine intro eligibility (#2808)
Follow up to #2796.
This also makes `PaywallData.Configuration`'s intro strings optional.

- Injected `TrialOrIntroEligibilityChecker`
- Created mock `TrialOrIntroEligibilityChecker` for previews
- Handling state and transitions for loading eligibility
- Snapshot tests for the different new cases
- Improved `SnapshotTesting` delay management
- Expanded `DebugErrorView` to customize release behavior
2023-09-14 18:28:11 -07:00

24 lines
361 B
Swift

//
// ViewExtensions.swift
//
//
// Created by Nacho Soto on 7/13/23.
//
import Foundation
import SwiftUI
@available(iOS 13.0, tvOS 13.0, macOS 10.15, watchOS 6.2, *)
extension View {
@ViewBuilder
func hidden(if condition: Bool) -> some View {
if condition {
self.hidden()
} else {
self
}
}
}