nice spot of refactoring and fixing sizing issues
This commit is contained in:
@@ -49,8 +49,7 @@ struct OnboardingTemplateView: View {
|
|||||||
|
|
||||||
self.bottomActionArea
|
self.bottomActionArea
|
||||||
}
|
}
|
||||||
.padding()
|
.padding(screenWidth * 0.1)
|
||||||
.frame(maxWidth: screenWidth - 20)
|
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
} //outermost vstack
|
} //outermost vstack
|
||||||
@@ -73,10 +72,10 @@ struct OnboardingTemplateView: View {
|
|||||||
} else {
|
} else {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
|
|
||||||
Text(self.mainLeadingActionText!)
|
Text(self.mainLeadingActionText! + " ")
|
||||||
.font(.title)
|
.font(.title)
|
||||||
.foregroundColor(NirvanaColor.black)
|
.foregroundColor(NirvanaColor.black)
|
||||||
+ Text(self.mainHighlightedActionText!)
|
+ Text(self.mainHighlightedActionText! + " ")
|
||||||
.font(.title)
|
.font(.title)
|
||||||
.foregroundColor(NirvanaColor.teal)
|
.foregroundColor(NirvanaColor.teal)
|
||||||
+ Text(self.mainTrailingActionText!)
|
+ Text(self.mainTrailingActionText!)
|
||||||
@@ -86,7 +85,6 @@ struct OnboardingTemplateView: View {
|
|||||||
Text(self.subActionText!)
|
Text(self.subActionText!)
|
||||||
.foregroundColor(Color.gray)
|
.foregroundColor(Color.gray)
|
||||||
.padding(.top, 5)
|
.padding(.top, 5)
|
||||||
.fixedSize(horizontal: false, vertical: true)
|
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
@@ -98,6 +96,32 @@ struct OnboardingTemplateView: View {
|
|||||||
|
|
||||||
struct OnboardingTemplateView_Previews: PreviewProvider {
|
struct OnboardingTemplateView_Previews: PreviewProvider {
|
||||||
static var previews: some View {
|
static var previews: some View {
|
||||||
OnboardingTemplateView()
|
OnboardingTemplateView(imgName: "undraw_friendship_mni7", mainLeadingActText: "Your", mainHighlightedActText: "minimalist", mainTrailingActText: "social media.", subActText: "Tired of the rat race on the test of th4e best oadf the best?", bottomActArea: AnyView(
|
||||||
|
VStack(alignment: .center) {
|
||||||
|
NavigationLink(destination: HomeView()) {
|
||||||
|
Text("Start Your Detox")
|
||||||
|
.bold()
|
||||||
|
.foregroundColor(NirvanaColor.white)
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
.padding(.vertical, 20)
|
||||||
|
.background(NirvanaColor.teal)
|
||||||
|
.clipShape(Capsule())
|
||||||
|
.shadow(radius:10)
|
||||||
|
}
|
||||||
|
|
||||||
|
Button(
|
||||||
|
action: {
|
||||||
|
print("link to website learn more clicked")
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
Text("Learn More")
|
||||||
|
.bold()
|
||||||
|
})
|
||||||
|
|
||||||
|
//learn more button to usenirvana.com
|
||||||
|
}
|
||||||
|
.padding(.top, 20)
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ struct WelcomeView: View {
|
|||||||
let screenHeight = UIScreen.main.bounds.height
|
let screenHeight = UIScreen.main.bounds.height
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
OnboardingTemplateView(imgName: "undraw_friendship_mni7", mainLeadingActText: "Your", mainHighlightedActText: "minimalist", mainTrailingActText: "social media.", subActText: "Tired of the rat race?", bottomActArea: AnyView(
|
OnboardingTemplateView(imgName: "undraw_friendship_mni7", mainLeadingActText: "Your", mainHighlightedActText: "minimalist", mainTrailingActText: "social media.", subActText: "Tired of the rat race on insta, snap, tik-tok, \"meta\"?", bottomActArea: AnyView(
|
||||||
VStack(alignment: .center) {
|
VStack(alignment: .center) {
|
||||||
NavigationLink(destination: HomeView()) {
|
NavigationLink(destination: HomeView()) {
|
||||||
Text("Start Your Detox")
|
Text("Start Your Detox")
|
||||||
|
|||||||
Reference in New Issue
Block a user