Created
November 4, 2020 12:01
-
-
Save laevandus/d8aff02a001ec80ba383eeb72a0f9aa3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
struct InputView: View { | |
let title: String | |
var placeholder: String = "" | |
let value: Binding<String> | |
var body: some View { | |
VStack { | |
HStack { | |
Text(title) | |
.font(.subheadline) | |
Spacer() | |
} | |
TextField(placeholder, text: value) | |
.textFieldStyle(RoundedBorderTextFieldStyle()) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment