Skip to content

Commit 7820b56

Browse files
fix: update cancel button
1 parent 786bdd1 commit 7820b56

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

FirebaseSwiftUI/FirebasePhoneAuthSwiftUI/Sources/Services/PhoneAuthProviderAuthUI.swift

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,20 @@ private struct PhoneAuthFlowView: View {
104104
}
105105
}
106106
.toolbar {
107-
ToolbarItem(placement: .cancellationAction) {
108-
Button("Cancel") {
109-
coordinator.cancel()
110-
}
107+
toolbar
108+
}
109+
}
110+
.interactiveDismissDisabled(authService.configuration.interactiveDismissEnabled)
111+
}
112+
113+
@ToolbarContentBuilder
114+
var toolbar: some ToolbarContent {
115+
ToolbarItem(placement: .topBarTrailing) {
116+
if !authService.configuration.shouldHideCancelButton {
117+
Button {
118+
coordinator.cancel()
119+
} label: {
120+
Image(systemName: "xmark")
111121
}
112122
}
113123
}

0 commit comments

Comments
 (0)