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

import SwiftUI

struct ClassicTextDisplay: View {
    
    let text : String
    
    init(text: String) {
        self.text = text
    }
    
    var body: some View {
        Text("\(text)")
            .font(.headline)
            .frame(height: 50, alignment: .center)
            .padding([.leading, .trailing], 20)
            .background(Color.primaryColor)
            .foregroundColor(Color.white)
            .bold()
            .cornerRadius(15)
        
    }
}

struct ClassicTextDisplay_Previews: PreviewProvider {
    
    static var previews: some View {
        ClassicTextDisplay(text: "test")
    }
}

