Skip to content

Commit 325759c

Browse files
committed
Update README
1 parent 538e4ef commit 325759c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Documentation/Overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct ContentView: View {
1818
@SceneStorage("editPosition") private var editPosition: CodeEditor.Position = CodeEditor.Position()
1919

2020
var body: some View {
21-
CodeEditor(text: $text, position: $editLocation, messages: $messages, language: .swift)
21+
CodeEditor(text: $text, position: $editPosition, messages: $messages, language: .swift)
2222
.environment(\.codeEditorTheme,
2323
colorScheme == .dark ? Theme.defaultDark : Theme.defaultLight)
2424
}

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ Typical usage of the view is as follows.
2020
```swift
2121
struct ContentView: View {
2222
@State private var text: String = "My awesome code..."
23-
@State private var messages: Set<Located<Message>> = Set ()
23+
@State private var position: CodeEditor.Position = CodeEditor.Position()
24+
@State private var messages: Set<Located<Message>> = Set()
2425

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

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

5152
## License
5253

53-
Copyright 2021 Manuel M. T. Chakravarty.
54+
Copyright [2021..2022] Manuel M. T. Chakravarty.
5455

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

0 commit comments

Comments
 (0)