Unify disabled states and preserve station verdicts

This commit is contained in:
FuelBoard Contributor
2026-10-17 18:22:55 +01:00
parent ff6cbbe07d
commit 7111ce38af
6 changed files with 77 additions and 83 deletions
+12
View File
@@ -0,0 +1,12 @@
import SwiftUI
/// Applies FuelBoard's shared unavailable appearance and native interaction state
/// to a complete dependent row or group. Apply it once at the highest dependent
/// container so labels, values, icons, descriptions and controls fade together.
extension View {
func fuelBoardDisabledState(isEnabled: Bool) -> some View {
disabled(!isEnabled)
.allowsHitTesting(isEnabled)
.opacity(isEnabled ? 1 : 0.5)
}
}