// // RegisterView.swift // Comedores Sociales // // Created by Hector Carrion on 10/24/20. // import SwiftUI struct RegisterView: View { @State var firstName: String = "" @State var lastName: String = "" @State var phoneNumber: String = "" @State var email: String = "" @State var password: String = "" @Environment(\.colorScheme) var colorScheme var body: some View { VStack { Text("Details") .font(.largeTitle) .fontWeight(.semibold) .frame(width: 350, height: 25, alignment: .topLeading) .padding(.bottom, 20) TextField("First Name", text: $firstName) .padding() .background(colorScheme == .dark ? darkGreyColor : lightGreyColor) .cornerRadius(5.0) .padding(.bottom, 5) TextField("Last Name", text: $lastName) .padding() .background(colorScheme == .dark ? darkGreyColor : lightGreyColor) .cornerRadius(5.0) .padding(.bottom, 5) TextField("Phone Number", text: $phoneNumber) .keyboardType(.numberPad) .padding() .background(colorScheme == .dark ? darkGreyColor : lightGreyColor) .cornerRadius(5.0) .padding(.bottom, 5) TextField("Email", text: $email) .autocapitalization(.none) .padding() .background(colorScheme == .dark ? darkGreyColor : lightGreyColor) .cornerRadius(5.0) .padding(.bottom, 5) SecureField("Password", text: $password) .autocapitalization(.none) .padding() .background(colorScheme == .dark ? darkGreyColor : lightGreyColor) .cornerRadius(5.0) .padding(.bottom, 20) Button(action: {print("register tapped")}) { Text("Register") .font(.headline) .foregroundColor(.white) .padding() .frame(width: 220, height: 50) .background(Color.blue) .cornerRadius(5) .padding(.bottom, 5) } }.padding() } } struct RegisterView_Previews: PreviewProvider { static var previews: some View { RegisterView() } }