Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
struct ContentView: View {
@State var text : String = ""
@State var password : String = ""
var body: some View {
ZStack{
Color(red: 240/255, green: 240/255, blue: 243/255)
GroupBox(label: Label("Enter Your Details", systemImage: "sun.min")
.font(.subheadline), content: {
VStack{
TextField("Username", text: $text)
.textFieldStyle(RoundedBorderTextFieldStyle())
.padding(.all, 5)
SecureField("Password", text: $password)
.textFieldStyle(RoundedBorderTextFieldStyle())
.padding(.all, 5)
Button(action: {}) {
Image(systemName: "chevron.right")
.renderingMode(.template)
.foregroundColor(.black)
.frame(width: 30, height: 30)
.padding(10)
.background(Color(red: 240/255, green: 240/255, blue: 243/255))
.cornerRadius(10)
}
.shadow(color: Color.white, radius: 10, x: -10, y: -10)
.shadow(color: Color(red: 174/255, green: 174/255, blue: 192/255).opacity(0.4), radius: 10, x: 10, y: 10)
}
})
.cornerRadius(10)
.shadow(color: Color.white, radius: 10, x: -10, y: -10)
.shadow(color: Color(red: 174/255, green: 174/255, blue: 192/255).opacity(0.4), radius: 10, x: 10, y: 10)
.padding()
}
.edgesIgnoringSafeArea(/*@START_MENU_TOKEN@*/.all/*@END_MENU_TOKEN@*/)
.frame(maxWidth: .infinity,maxHeight: .infinity)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment