Use .cancellationAction placement for close button
This commit is contained in:
parent
5b2ccaa110
commit
1cfe6167e0
|
@ -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: {
|
||||
|
|
Loading…
Reference in New Issue