Change side of SwiftUI .toolbar

Viewed 505

How do you adjust the vertical height of the .toolbar with SwiftUI? As seen in the image below, the toolbar is way too large (all I need it to do is just to fit those three items):

Too large toolbar

            NavigationView {
            VStack{
                MapView()
                }.toolbar {
                    ToolbarItem(placement: .principal) {
                        HStack(spacing: 20) {
                            Text("Toolbar")
                            Divider()
                            Button(action: {}) {Image(systemName: "plus.circle")}
                            Divider()
                            Button(action: {}) {Image(systemName:"arrowshape.turn.up.left.circle") 
                            }
                        }
                    }
                
           }
1 Answers
struct ContentView: View {
        var body: some View {
            NavigationView {
                VStack{
                    MapView()
                }.toolbar {
                    ToolbarItem(placement: .principal) {
                    HStack(spacing: 20) {
                        Text("Toolbar")
                        Divider()
                    Button(action: {}) {Image(systemName: "plus.circle")}
                        Divider()
                    Button(action: {}) {Image(systemName:"arrowshape.turn.up.left.circle")
                        }
                    }
                }
            }
            .navigationBarTitle("", displayMode: .inline)
        }
    }
}

Result: enter image description here

Related