Last active
June 9, 2021 19:44
-
-
Save aheze/f2286c27c7907a5cd5408ae9a9d5d920 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 ContentView: View { | |
@State var markdownText = "" | |
var body: some View { | |
HStack { | |
VStack { | |
Text("Markdown") | |
.fontWeight(.bold) | |
TextEditor(text: $markdownText) | |
.frame(width: 400) | |
.padding() | |
.background(Color(uiColor: .secondarySystemBackground)) | |
.cornerRadius(16) | |
.padding(.bottom, 16) | |
} | |
VStack { | |
Text("Output") | |
.fontWeight(.bold) | |
Text("Output goes here!") | |
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading) | |
.padding() | |
.background(Color(uiColor: .secondarySystemBackground)) | |
.cornerRadius(16) | |
.padding(.bottom, 16) | |
} | |
} | |
.font(.title2) | |
.padding() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment