Fix disabling horizontal scroll on onboarding screens and made showing only certain steps more reusable

This commit is contained in:
Fabian Thies
2023-05-20 22:14:50 +02:00
parent e3103b3034
commit 9c3461b0c6
3 changed files with 57 additions and 66 deletions

View File

@@ -9,22 +9,6 @@
import SwiftUI
struct OnboardingStep<Title: View, Hero: View, Content: View, Action: View> {
@ViewBuilder
var title: Title
@ViewBuilder
var hero: Hero
@ViewBuilder
var content: Content
@ViewBuilder
var action: Action
}
struct OnboardingStepView<Title: View, Hero: View, Content: View, Action: View>: View {
@ViewBuilder
@@ -49,6 +33,7 @@ struct OnboardingStepView<Title: View, Hero: View, Content: View, Action: View>:
.frame(height: 150)
self.content
.frame(maxWidth: .infinity, alignment: .leading)
Spacer()