Last active
March 22, 2020 16:11
-
-
Save hrvolapeter/03ed2e932c58b95cec1667d6f3a30f4d to your computer and use it in GitHub Desktop.
Zetten - tutorial authenticationView step 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct LoginView: View { | |
@State var email: String = "" | |
@State var password: String = "" | |
var body: some View { | |
VStack { | |
Text("Login") | |
.font(.title) | |
TextField("Email", text: $email) | |
.autocapitalization(.none) | |
SecureField("Password", text: $password) | |
.autocapitalization(.none) | |
Button( | |
"Login", | |
action: {} | |
) | |
Divider() | |
Group { | |
Text("Don't have an account?").foregroundColor(.gray) | |
Text("Create an account") | |
}.font(.footnote) | |
Spacer() | |
}.padding() | |
} | |
} | |
struct LoginView_Previews: PreviewProvider { | |
static var previews: some View { | |
LoginView() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment