//
//  DoubleTextDisplay.swift
//  DouShouQiIOS
//
//  Created by Mathilde Jean on 31/05/2024.
//

import SwiftUI

struct DoubleTextDisplay: View {
    let textL : String
    let textR : String
    
    init(textL: String, textR: String) {
        self.textL = textL
        self.textR = textR
    }
    
    var body: some View {
        HStack{
            Text(textL)
                .frame(height: 50, alignment: .center)
                .padding([.leading, .trailing], 20)
                .background(Color.primaryColor)
                .foregroundColor(Color.white)
                .bold()
                .cornerRadius(15)
                
            Text(textR)
                .foregroundColor(.primaryColor)
                .padding([.leading], 10)
                .padding([.trailing], 20)
        }.overlay(
            RoundedRectangle(cornerRadius: 15)
            .stroke(Color.primaryColor, lineWidth: 3)
        )    }
}

struct DoubleTextDisplay_Previews: PreviewProvider {
    
    static var previews: some View {
        DoubleTextDisplay(textL: "W/L", textR: "2")
    }
}

