How to setup toolbar for sheets in SwiftUI on macOS?

I’d like to know, how I can setup a toolbar inside a sheet using SwiftUI on macOS.

I tried adding a NavigationView and used the following Code, but the top area of the sheet is always empty.

Code Block
.toolbar {
                ToolbarItem(placement: .confirmationAction) {
                    Button(action: {
//                      Do stuff
                        self.presentationMode.wrappedValue.dismiss()
                    }
                    ) {
                        Label("Done", systemImage: "checkmark.fill")
                    }
                }
                ToolbarItem(placement: .cancellationAction) {
                    Button(action: {
                        self.presentationMode.wrappedValue.dismiss()
                    }
                    ) {
                        Label("Cancel", systemImage: "checkmark.fill")
                    }
                }
            }


I have submitted a feedback issue over this. I don't believe it's currently working as expected. The same is true when assigning toolbar items to a sheet on iOS as well. Only automatic and bottomBar seem to work there.
Adding ToolbarItems to iOS sheets actually works, if you put the content of the sheet inside a NavigationView. But shouldn't be like that.
The issue is resolved in 11.1

I'm still hitting this problem on MacOS / Xcode 14.3. More specifically, bottom bar items appear (.primaryAction, .secondaryAction, .automatic), but items such as .navigation and .principal don't.

And yes, this is all within a NavigationStack.

How to setup toolbar for sheets in SwiftUI on macOS?
 
 
Q