comparison 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
comparison
equal deleted inserted replaced
184:7cb2b0b2b3f3 185:2fc95efcb1ee
1 //
2 // CurrencyTextfield.swift
3 // Simoleon
4 //
5 // Created by Dennis Concepción Martín on 21/12/21.
6 //
7
8 import SwiftUI
9
10 struct CurrencyTextfield: View {
11 var currencyCode: String
12 @Binding var amount: String
13
14 var body: some View {
15 VStack {
16 TextField("Enter the amount", text: $amount)
17 .keyboardType(.decimalPad)
18 .font(.title2)
19 .padding(15)
20 .background(
21 Color(.secondarySystemBackground)
22 .cornerRadius(15)
23 .frame(height: 55)
24 )
25 }
26 }
27 }
28
29 struct CurrencyTextfield_Previews: PreviewProvider {
30 static var previews: some View {
31 CurrencyTextfield(currencyCode: "USD", amount: .constant("1"))
32 }
33 }