Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
mchakravarty committed Feb 21, 2022
1 parent 538e4ef commit 325759c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Documentation/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct ContentView: View {
@SceneStorage("editPosition") private var editPosition: CodeEditor.Position = CodeEditor.Position()

var body: some View {
CodeEditor(text: $text, position: $editLocation, messages: $messages, language: .swift)
CodeEditor(text: $text, position: $editPosition, messages: $messages, language: .swift)
.environment(\.codeEditorTheme,
colorScheme == .dark ? Theme.defaultDark : Theme.defaultLight)
}
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ Typical usage of the view is as follows.
```swift
struct ContentView: View {
@State private var text: String = "My awesome code..."
@State private var messages: Set<Located<Message>> = Set ()
@State private var position: CodeEditor.Position = CodeEditor.Position()
@State private var messages: Set<Located<Message>> = Set()

@Environment(\.colorScheme) private var colorScheme: ColorScheme

var body: some View {
CodeEditor(text: $text, messages: $messages, language: .swift)
CodeEditor(text: $text, position: $position, messages: $messages, language: .swift)
.environment(\.codeEditorTheme,
colorScheme == .dark ? Theme.defaultDark : Theme.defaultLight)
}
Expand All @@ -50,6 +51,6 @@ I consider this to be pre-release quality. It is sufficient to start building so

## License

Copyright 2021 Manuel M. T. Chakravarty.
Copyright [2021..2022] Manuel M. T. Chakravarty.

Distributed under the Apache-2.0 license — see the [license file](LICENSE) for details.

0 comments on commit 325759c

Please sign in to comment.