view Simoleon/Helpers/CurrencyRow.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 13d5a8deb6c2
children
line wrap: on
line source

//
//  CurrencyRow.swift
//  Simoleon
//
//  Created by Dennis Concepción Martín on 20/12/21.
//

import SwiftUI

struct CurrencyRow: View {
    var currency: SupportedCurrencyResult
    
    var body: some View {
        HStack {
            Flag(currencyCode: currency.code)
            
            VStack(alignment: .leading) {
                Text(currency.code)
                    .font(.headline)
                
                Text(currency.name)
                    .font(.callout)
                    .opacity(0.6)
            }
            .foregroundColor(.primary)
            .padding(.leading)
        }
    }
}

struct CurrencyRow_Previews: PreviewProvider {
    static var previews: some View {
        CurrencyRow(
            currency:
                SupportedCurrencyResult(code: "EUR", name: "Euro", isCrypto: 0)
        )
    }
}