//
//  InfoDetailView.swift
//  WtaTennis
//
//  Created by Johan LACHENAL on 14/05/2024.
//

import SwiftUI

struct InfoDetailView: View {
    var body: some View {
        ZStack {
            Color.purple.edgesIgnoringSafeArea(.all)
            VStack(alignment: .leading, spacing: 20) {
                Text("Iga Swiatek")
                    .font(.largeTitle)
                    .fontWeight(.bold)
                    .foregroundColor(.white)
                
                HStack {
                    Image(systemName: "flag.fill")
                        .foregroundColor(.white)
                    Text("POLAND")
                        .foregroundColor(.white)
                }
                
                InfoTextView(title: "Height", value: "5' 9\"")
                InfoTextView(title: "Age", value: "22")
                InfoTextView(title: "Plays", value: "Right-Handed")
                InfoTextView(title: "Birthplace", value: "Warsaw, Poland")
            }
            .padding()
        }
    }
}

struct InfoDetailView_Previews: PreviewProvider {
    static var previews: some View {
        InfoDetailView()
    }
}
    
