You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
799 B
29 lines
799 B
import SwiftUI
|
|
|
|
struct SearchUserBar: View {
|
|
@Binding var text: String
|
|
@State var action: () -> Void
|
|
|
|
var body: some View {
|
|
ZStack {
|
|
HStack {
|
|
TextField(
|
|
"Search User", text: $text
|
|
)
|
|
.padding([.leading, .trailing], 8)
|
|
.frame(height: 32)
|
|
.background(Color.white.opacity(0.4))
|
|
.cornerRadius(8)
|
|
|
|
Button(
|
|
action: action,
|
|
label: { Text("Search") }
|
|
)
|
|
.foregroundColor(Color.white)
|
|
}
|
|
.padding([.leading, .trailing], 16)
|
|
}
|
|
.frame(height: 64)
|
|
.background(Color.yellow)
|
|
}
|
|
}
|
|
|