simple changes for the sheet for the learn more on welcome page

This commit is contained in:
talksik
2021-12-14 18:30:53 -08:00
parent 6cea5ff0d6
commit 15211ab3b6
3 changed files with 37 additions and 6 deletions
@@ -8,6 +8,8 @@
import SwiftUI
struct WelcomeView: View {
@State var showLearnMore = false
var body: some View {
NavigationView {
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(
@@ -26,11 +28,15 @@ struct WelcomeView: View {
Button(
action: {
print("link to website learn more clicked")
showLearnMore.toggle()
},
label: {
Text("Learn More")
.bold()
})
.sheet(isPresented: $showLearnMore) {
LearnMoreView()
}
//learn more button to usenirvana.com
}
@@ -45,9 +51,36 @@ struct WelcomeView: View {
struct WelcomeView_Previews: PreviewProvider {
static var previews: some View {
WelcomeView()
WelcomeView().environmentObject(AuthSessionStore())
}
}
struct LearnMoreView: View {
@Environment(\.presentationMode) var presentationMode
var body: some View {
ScrollView {
Text("🍃your minimalist social media\n")
.font(.title)
.foregroundColor(NirvanaColor.black)
Text("tired of the rat race on ")
.font(.title)
Text("insta, tiktok, snap, \"meta\"...?\n")
.font(.title)
.foregroundColor(NirvanaColor.light)
Text("start your detox with us and:\n- live in the present\n- build a more intimate inner circle\n- cut out the noise\n- focus on your goals and personal growth")
.font(.title)
Text("p.s. we don't sell your data or hire phd's to drug you...")
.font(.subheadline)
Spacer()
Button("Dismiss Me") {
presentationMode.wrappedValue.dismiss()
}
.padding()
}.padding(25)
}
}