import Foundation
import SwiftUI
import SFSafeSymbols

struct TagView: View {

    let text: String

    init(text: String) {
        self.text = text
    }

    var body: some View {
        HStack {
            Text(text)
                .font(.subheadline)
                .padding(.leading, 2)
        }
        .font(.caption2)
        .padding(.horizontal, 8)
        .padding(.vertical, 4)
        .background(Color.accentColor)
        .cornerRadius(8)
    }
}

#Preview {
    HStack {
        TagView(text: "Some")
        TagView(text: "Etwas")
    }.background(Color.secondary)
}
