Unify disabled states and preserve station verdicts
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user