-
-
Save sturdysturge/48932a09d543e1c81a8aca92520ab3d6 to your computer and use it in GitHub Desktop.
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
struct TextEditorView: View { | |
@Binding var text: String | |
let fontSize: CGFloat | |
let fontWeight: Font.Weight | |
let foregroundColor: Color | |
var body: some View { | |
TextEditor(text: $text) | |
.font(.system(size: fontSize, weight: fontWeight)) | |
.foregroundColor(foregroundColor) | |
.frame(height: 300) | |
.padding() | |
.border(Color.secondary, width: 4) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment