-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Glow blocks input on buttons #29
Comments
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()
}
} |
Merged
Fixed in 0.3.1 |
This issue is back on the last version. Can you please fix again. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'll investigate.
The text was updated successfully, but these errors were encountered: