| 1 |
// |
|
| 2 |
// MeterInfoCard.swift |
|
| 3 |
// USB Meter |
|
| 4 |
// |
|
| 5 | ||
| 6 |
import SwiftUI |
|
| 7 | ||
| 8 |
struct MeterInfoCard<Content: View>: View {
|
|
| 9 |
let title: String |
|
| 10 |
let tint: Color |
|
| 11 |
@ViewBuilder var content: Content |
|
| 12 | ||
| 13 |
var body: some View {
|
|
| 14 |
VStack(alignment: .leading, spacing: 12) {
|
|
| 15 |
Text(title) |
|
| 16 |
.font(.headline) |
|
| 17 |
content |
|
| 18 |
} |
|
| 19 |
.frame(maxWidth: .infinity, alignment: .leading) |
|
| 20 |
.padding(18) |
|
| 21 |
.meterCard(tint: tint, fillOpacity: 0.18, strokeOpacity: 0.24) |
|
| 22 |
} |
|
| 23 |
} |