Use .cancellationAction placement for close button

This commit is contained in:
Davide De Rosa 2022-04-19 23:11:04 +02:00
parent 5b2ccaa110
commit 1cfe6167e0
1 changed files with 2 additions and 2 deletions

View File

@ -280,7 +280,7 @@ extension String {
extension View {
func themeCloseItem(presentationMode: Binding<PresentationMode>) -> some ToolbarContent {
ToolbarItem(placement: .navigationBarLeading) {
ToolbarItem(placement: .cancellationAction) {
Button {
presentationMode.wrappedValue.dismiss()
} label: {
@ -290,7 +290,7 @@ extension View {
}
func themeCloseItem(isPresented: Binding<Bool>) -> some ToolbarContent {
ToolbarItem(placement: .navigationBarLeading) {
ToolbarItem(placement: .cancellationAction) {
Button {
isPresented.wrappedValue = false
} label: {