Mercurial > public > simoleon
view Simoleon/Helpers/CurrencySelectorLabel.swift @ 185:2fc95efcb1ee
connect backend
author | Dennis Concepcion Martin <dennisconcepcionmartin@gmail.com> |
---|---|
date | Wed, 22 Dec 2021 16:12:23 +0100 |
parents | |
children | 13d5a8deb6c2 |
line wrap: on
line source
// // CurrencySelectorLabel.swift // Simoleon // // Created by Dennis Concepción Martín on 20/12/21. // import SwiftUI struct CurrencySelectorLabel: View { var currency: SupportedCurrencyResult var body: some View { RoundedRectangle(cornerRadius: 15) .foregroundColor(Color(.secondarySystemBackground)) .frame(height: 60) .overlay( HStack { let flagName = getFlagName(currency: currency) Flag(flagName: flagName) Text(currency.code) .font(.headline) .foregroundColor(.primary) .padding(.leading, 5) } ) } } struct CurrencySelectorLabel_Previews: PreviewProvider { static var previews: some View { CurrencySelectorLabel( currency: SupportedCurrencyResult(code: "EUR", name: "Euro", isCrypto: 0) ) } }