view Simoleon/Helpers/CurrencyTextfield.swift @ 195:7b009649a063 default tip

Move to mercurial
author Dennis C. M. <dennis@denniscm.com>
date Tue, 03 Jun 2025 14:43:48 +0100
parents e4f5dcf4d596
children
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 {
        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"))
    }
}