Glow blocks input on buttons
robb opened this issue · comments
Robb Böhnke commented
I'll investigate.
Eric Lewis commented
import SwiftUI
import Pow
struct ContentView: View {
@State
private var active = false
var body: some View {
NavigationView {
Rectangle()
.sheet(isPresented: .constant(true)) {
NavigationView {
Text("Is active: \(active ? "yes" : "no")")
.safeAreaInset(edge: .bottom) {
Button(role: active ? .destructive : nil) {
active.toggle()
} label: {
if active == true {
Label("Stop Listening", systemImage: "stop.fill")
} else {
Label("Start Listening", systemImage: "shazam.logo")
}
}
.conditionalEffect(.repeat(.glow(color: .blue, radius: 50), every: 1.5), condition: !active)
.animation(.default, value: true)
.buttonStyle(.borderedProminent)
.buttonBorderShape(.capsule)
.controlSize(.large)
.keyboardShortcut(.defaultAction)
.imageScale(.large)
.shadow(radius: 4)
}
}
.presentationDetents([.medium, .large])
.presentationBackgroundInteraction(
.enabled(upThrough: .medium)
)
.presentationDragIndicator(.hidden)
.interactiveDismissDisabled()
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Robb Böhnke commented
Fixed in 0.3.1
Tarek Mansour commented
This issue is back on the last version. Can you please fix again.