view Simoleon/UI/Flag.swift @ 161:3913aff613e8

Fix bug that didn't request API on symbol change
author Dennis Concepcion Martin <dennisconcepcionmartin@gmail.com>
date Tue, 31 Aug 2021 10:57:34 +0100
parents 0c589138a6f3
children
line wrap: on
line source

//
//  Flag.swift
//  Simoleon
//
//  Created by Dennis Concepción Martín on 24/8/21.
//

import SwiftUI

struct Flag: View {
    var flag: String
    
    var body: some View {
        Image(flag)
            .resizable()
            .aspectRatio(contentMode: .fill)
            .frame(width: 35, height: 35)
            .clipShape(Circle())
    }
}

struct Flag_Previews: PreviewProvider {
    static var previews: some View {
        Flag(flag: "GB")
    }
}