Mercurial > public > simoleon
view Simoleon/Helpers/CurrencyTextfield.swift @ 187:13d5a8deb6c2
add AboutView and FavoritesView
author | Dennis Concepcion Martin <dennisconcepcionmartin@gmail.com> |
---|---|
date | Thu, 23 Dec 2021 16:12:22 +0100 |
parents | 2fc95efcb1ee |
children | e4f5dcf4d596 |
line wrap: on
line source
// // CurrencyTextfield.swift // Simoleon // // Created by Dennis Concepción Martín on 21/12/21. // import SwiftUI struct CurrencyTextfield: View { var currencyCode: String @Binding var amount: String var body: some View { VStack { TextField("Enter the amount", text: $amount) .keyboardType(.decimalPad) .font(.title2) .padding(15) .background( Color(.secondarySystemBackground) .cornerRadius(15) .frame(height: 55) ) } } } struct CurrencyTextfield_Previews: PreviewProvider { static var previews: some View { CurrencyTextfield(currencyCode: "USD", amount: .constant("1")) } }