Files
iKeyMon/Views/Cells/InfoCell.swift
2025-11-15 19:49:28 +01:00

48 lines
991 B
Swift

//
// InfoBarCell.swift
// iKeyMon
//
// Created by tracer on 03.04.25.
//
//
// ResourcesBarRow.swift
// iKeyMon
//
// Created by tracer on 31.03.25.
//
import SwiftUI
struct InfoCell: View {
var value: [String]
var monospaced: Bool = false
var color: Color = .primary
init(value: [String], monospaced: Bool = false) {
self.value = value
self.monospaced = monospaced
}
var body: some View {
VStack(alignment: .leading) {
VStack(alignment: .leading, spacing: 2) {
ForEach(value, id: \.self) { item in
Text(item)
.font(monospaced ? .system(.body, design: .monospaced) : .body)
}
}
// if let subtext {
// Text(subtext)
// .font(.caption)
// .foregroundColor(.secondary)
// }
}
}
}
#Preview {
InfoCell(value: ["Some Text", "Another Text"])
}