view Simoleon/Helpers/CurrencyTextfield.swift @ 185:2fc95efcb1ee

connect backend
author Dennis Concepcion Martin <dennisconcepcionmartin@gmail.com>
date Wed, 22 Dec 2021 16:12:23 +0100
parents
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"))
    }
}