Mercurial > public > simoleon
view Simoleon/UI/SearchBar.swift @ 171:70f0625bfcf1
Merge pull request #17 from denniscm190/development
open source project
committer: GitHub <noreply@github.com>
author | Dennis C. M. <dennis@denniscm.com> |
---|---|
date | Tue, 12 Oct 2021 16:17:35 +0200 |
parents | Simoleon/Helpers/SearchBar.swift@04feeb708833 Simoleon/Helpers/SearchBar.swift@84137052813d |
children |
line wrap: on
line source
// // SearchBar.swift // Simoleon // // Created by Dennis Concepción Martín on 27/07/2021. // import SwiftUI struct SearchBar: View { var placeholder: LocalizedStringKey @Binding var text: String var body: some View { TextField(placeholder, text: $text) .disableAutocorrection(true) .padding(10) .background( RoundedRectangle(cornerRadius: 15) .foregroundColor(Color(.tertiarySystemFill)) ) } } struct SearchBar_Previews: PreviewProvider { static var previews: some View { SearchBar(placeholder: "Search ...", text: .constant("")) } }