Added Alert.Button.ok()
This commit is contained in:
parent
89d6ea1002
commit
6100810c16
|
@ -10,3 +10,12 @@ extension View {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
extension Alert.Button {
|
||||
|
||||
public static func ok(_ action: (() -> Void)? = {}) -> Alert.Button {
|
||||
return .default(Text("OK"), action: action)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ struct AddAccountDialog: View {
|
|||
}
|
||||
}
|
||||
.alert(item: $errorMessage) { message in
|
||||
Alert(title: message.title, message: message.message, dismissButton: Alert.Button.cancel()))
|
||||
Alert(title: message.title, message: message.message, dismissButton: .ok())
|
||||
}
|
||||
.navigationBarTitle(Text("Add account"), displayMode: NavigationBarItem.TitleDisplayMode.inline)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue