Making a default button on macOS?

Hello,


Any guidance as to how to make a default button on macOS?


struct ContentView: View {

var body: some View {

HStack() {

Button(action: {print("OK")}) {

Text("OK")

}

Button(action: {print("Cancel")}) {

Text("Cancel")

}

}.padding()

}

}


If I want the OK button to be the default and given the appropriate border?


Thanks!

Replies

Seems like it's not quite RTR in SwiftUI just yet (vs. what we talked about that used to work)... Seen this SO thread?


https://stackoverflow.com/questions/57283931/swiftui-on-mac-how-do-i-designate-a-button-as-being-the-primary