Contents

confirm

A role that indicates a button that confirms an operation.

Declaration

static let confirm: ButtonRole

Discussion

The following view would display a confirm button in the toolbar.

struct NewContactSheet: View {
    var body: some View {
        NavigationStack {
            NewContactEditor()
                .toolbar {
                    Button(role: .confirm) {
                        saveChanges()
                    }
                }
        }
    }
}