Skip to content

Instantly share code, notes, and snippets.

@aheze
Last active June 9, 2021 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aheze/f2286c27c7907a5cd5408ae9a9d5d920 to your computer and use it in GitHub Desktop.
Save aheze/f2286c27c7907a5cd5408ae9a9d5d920 to your computer and use it in GitHub Desktop.
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