We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac0b7e9 commit 2bdb3faCopy full SHA for 2bdb3fa
1 file changed
Sources/ProjectNavigator/EditableLabel.swift
@@ -18,6 +18,21 @@ public struct EditableLabel: View {
18
19
@FocusState private var isFocused: Bool
20
21
+ /// A label whose text can be edited.
22
+ ///
23
+ /// - Parameters:
24
+ /// - text: The label text.
25
+ /// - image: Image to use for the label.
26
+ /// - editedText: If non-nil, this text is being edited, while the label text is not shown.
27
28
+ /// Editing is aborted and the text before editing restored on exit.
29
30
+ public init(_ text: String, image: Image, editedText: Binding<String?>) {
31
+ self.text = text
32
+ self.image = image
33
+ self._editedText = editedText
34
+ }
35
+
36
/// A label whose text can be edited.
37
///
38
/// - Parameters:
0 commit comments