20 lines
623 B
Swift
20 lines
623 B
Swift
import SwiftUI
|
|
|
|
struct FanSpeedIndicator: View {
|
|
let title: Text
|
|
let rpm: Double?
|
|
|
|
var body: some View {
|
|
HStack(spacing: 5) {
|
|
Image(systemName: "fanblades.fill")
|
|
.foregroundStyle(.secondary)
|
|
.frame(width: 14, height: 14).accessibilityHidden(true)
|
|
title.foregroundStyle(.secondary)
|
|
Spacer(minLength: 2)
|
|
AnimatedMetricText(value: rpm.map { "\(Int($0.rounded())) RPM" } ?? "-- RPM")
|
|
.monospacedDigit().fontWeight(.medium)
|
|
}
|
|
.font(.system(size: 10)).lineLimit(1).minimumScaleFactor(0.7)
|
|
}
|
|
}
|