Skip to content

Commit

Permalink
doc: update document.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Mar 24, 2024
1 parent 7d88a79 commit 86b93f0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>SearchFieldExample.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>0</integer>
</dict>
</dict>
</dict>
Expand Down
18 changes: 18 additions & 0 deletions Sources/SearchField/SearchField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@

import SwiftUI

/// The search input box component can be placed in a non-specific location and is consistent with the default search input box style.
///
/// ## Example
///
/// ```swift
/// import SearchField
///
/// struct ContentView: View {
/// @State private var searchText = ""
/// var body: some View {
/// SearchField(searchText, textFieldChanged: { value in
/// print("value\(value)")
/// searchText = value
/// })
/// }
/// }
/// ```
///
@available(macOS 10.15, *)
public struct SearchField: View {
// A binding to a string value
Expand Down

0 comments on commit 86b93f0

Please sign in to comment.