23 lines
557 B
Swift
23 lines
557 B
Swift
import SwiftUI
|
|
|
|
struct MetricCard: View {
|
|
let title: String
|
|
let value: String
|
|
|
|
var body: some View {
|
|
VStack(alignment: .leading, spacing: 8) {
|
|
Text(title)
|
|
.font(.headline)
|
|
.foregroundColor(.secondary)
|
|
Text(value)
|
|
.font(.title)
|
|
.fontWeight(.bold)
|
|
}
|
|
.frame(maxWidth: .infinity, alignment: .leading)
|
|
.padding()
|
|
.background(Color(.controlBackgroundColor))
|
|
.cornerRadius(10)
|
|
.shadow(radius: 2)
|
|
}
|
|
}
|