We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a6176d commit 7d39688Copy full SHA for 7d39688
Examples/Inventory/ItemRow.swift
@@ -115,8 +115,9 @@ struct ItemRowView: View {
115
.buttonStyle(.plain)
116
.foregroundColor(self.viewModel.item.status.isInStock ? nil : Color.gray)
117
.alert(
118
- self.viewModel.item.name,
119
- isPresented: self.$viewModel.route.isPresent(/ItemRowViewModel.Route.deleteAlert),
+ title: { Text(self.viewModel.item.name) },
+ unwrapping: self.$viewModel.route,
120
+ case: /ItemRowViewModel.Route.deleteAlert,
121
actions: {
122
Button("Delete", role: .destructive) {
123
self.viewModel.deleteConfirmationButtonTapped()
0 commit comments