Use .cancellationAction placement for close button
This commit is contained in:
parent
5b2ccaa110
commit
1cfe6167e0
|
@ -280,7 +280,7 @@ extension String {
|
||||||
|
|
||||||
extension View {
|
extension View {
|
||||||
func themeCloseItem(presentationMode: Binding<PresentationMode>) -> some ToolbarContent {
|
func themeCloseItem(presentationMode: Binding<PresentationMode>) -> some ToolbarContent {
|
||||||
ToolbarItem(placement: .navigationBarLeading) {
|
ToolbarItem(placement: .cancellationAction) {
|
||||||
Button {
|
Button {
|
||||||
presentationMode.wrappedValue.dismiss()
|
presentationMode.wrappedValue.dismiss()
|
||||||
} label: {
|
} label: {
|
||||||
|
@ -290,7 +290,7 @@ extension View {
|
||||||
}
|
}
|
||||||
|
|
||||||
func themeCloseItem(isPresented: Binding<Bool>) -> some ToolbarContent {
|
func themeCloseItem(isPresented: Binding<Bool>) -> some ToolbarContent {
|
||||||
ToolbarItem(placement: .navigationBarLeading) {
|
ToolbarItem(placement: .cancellationAction) {
|
||||||
Button {
|
Button {
|
||||||
isPresented.wrappedValue = false
|
isPresented.wrappedValue = false
|
||||||
} label: {
|
} label: {
|
||||||
|
|
Loading…
Reference in New Issue