comparison Simoleon/Helpers/CurrencyRow.swift @ 185:2fc95efcb1ee

connect backend
author Dennis Concepcion Martin <dennisconcepcionmartin@gmail.com>
date Wed, 22 Dec 2021 16:12:23 +0100
parents
children 1ebd1c5dd302
comparison
equal deleted inserted replaced
184:7cb2b0b2b3f3 185:2fc95efcb1ee
1 //
2 // CurrencyRow.swift
3 // Simoleon
4 //
5 // Created by Dennis Concepción Martín on 20/12/21.
6 //
7
8 import SwiftUI
9
10 struct CurrencyRow: View {
11 var currency: SupportedCurrencyResult
12
13 var body: some View {
14 HStack {
15 let flagName = getFlagName(currency: currency)
16 Flag(flagName: flagName)
17
18 VStack(alignment: .leading) {
19 Text(currency.code)
20 .font(.headline)
21
22 Text(currency.name)
23 .font(.callout)
24 .opacity(0.6)
25 }
26 .padding(.leading)
27 }
28 }
29 }
30
31 struct CurrencyRow_Previews: PreviewProvider {
32 static var previews: some View {
33 CurrencyRow(
34 currency:
35 SupportedCurrencyResult(code: "EUR", name: "Euro", isCrypto: 0)
36 )
37 }
38 }