import SwiftUI // MARK: - DEV Ribbon Overlay /// Diagonal orange "DEV" ribbon in the lower-left corner. /// Only visible when IS_DEV is true. /// Taps pass through to content below. struct DevRibbonModifier: ViewModifier { func body(content: Content) -> some View { content .overlay(alignment: .bottomLeading) { if IS_DEV { ribbon .allowsHitTesting(false) } } } private var ribbon: some View { Text("DEV") .font(.system(size: 11, weight: .bold)) .tracking(2) .foregroundColor(.white) .frame(width: 130, height: 24) .background(Color(red: 1.0, green: 0.596, blue: 0.0)) // #FF9800 .rotationEffect(.degrees(45)) .offset(x: -28, y: -28) .shadow(color: .black.opacity(0.25), radius: 2, x: 0, y: 1) } } extension View { func devRibbon() -> some View { modifier(DevRibbonModifier()) } }