relays: bouncy edit animation

This commit is contained in:
William Casarin
2023-09-11 14:26:40 -07:00
parent 6a88ca2777
commit 16edc3fe13

View File

@@ -157,10 +157,13 @@ struct RelayConfigView: View {
if state.keypair.privkey != nil { if state.keypair.privkey != nil {
if showActionButtons { if showActionButtons {
Button("Done") { Button("Done") {
withAnimation(.bouncy) {
showActionButtons.toggle() showActionButtons.toggle()
} }
}
} else { } else {
Button("Edit") { Button("Edit") {
withAnimation(.bouncy) {
showActionButtons.toggle() showActionButtons.toggle()
} }
} }
@@ -168,6 +171,7 @@ struct RelayConfigView: View {
} }
} }
} }
}
struct RelayConfigView_Previews: PreviewProvider { struct RelayConfigView_Previews: PreviewProvider {
static var previews: some View { static var previews: some View {