Files
pulse-mobile/PulseHealth/Views/MetricCardView.swift

15 lines
617 B
Swift

import SwiftUI
struct MetricCardView: View {
let icon: String; let title: String; let value: String; let subtitle: String; let color: Color
var body: some View {
VStack(alignment: .leading, spacing: 12) {
Image(systemName: icon).foregroundColor(color).font(.title2)
Text(value).font(.title2.bold()).foregroundColor(.white)
Text(title).font(.subheadline).foregroundColor(.white.opacity(0.7))
Text(subtitle).font(.caption).foregroundColor(.white.opacity(0.5))
}
.padding(16).background(Color.white.opacity(0.05)).cornerRadius(16)
}
}