Updates following PR review.

Fix tests by moving constants out of Coordinator (as it is only part of the Riot target).
This commit is contained in:
Doug
2022-01-27 14:44:10 +00:00
parent cf46247e9f
commit 7ef1288628
14 changed files with 110 additions and 50 deletions
@@ -30,15 +30,11 @@ struct OnboardingSplashScreenPage: View {
/// The height of the non-scrollable content in the splash screen.
let overlayHeight: CGFloat
var isDarkModeEnabled: Bool {
theme.identifier != .light
}
// MARK: - Views
@ViewBuilder
var backgroundGradient: some View {
if !isDarkModeEnabled {
if !theme.isDark {
LinearGradient(gradient: content.gradient, startPoint: .leading, endPoint: .trailing)
.flipsForRightToLeftLayoutDirection(true)
}
@@ -47,7 +43,7 @@ struct OnboardingSplashScreenPage: View {
var body: some View {
VStack {
VStack {
Image(isDarkModeEnabled ? content.darkImage.name : content.image.name)
Image(theme.isDark ? content.darkImage.name : content.image.name)
.resizable()
.scaledToFit()
.frame(maxWidth: 300)
@@ -70,8 +66,8 @@ struct OnboardingSplashScreenPage: View {
Spacer().frame(maxHeight: overlayHeight)
}
.padding(.horizontal, 16)
.frame(maxWidth: OnboardingCoordinator.maxContentWidth,
maxHeight: OnboardingCoordinator.maxContentHeight)
.frame(maxWidth: OnboardingConstants.maxContentWidth,
maxHeight: OnboardingConstants.maxContentHeight)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(backgroundGradient.ignoresSafeArea())