Skip to content

Commit 63f2e77

Browse files
authored
Add reset button to form binding case (#910)
1 parent d992e4c commit 63f2e77

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Examples/CaseStudies/SwiftUICaseStudies/01-GettingStarted-Bindings-Forms.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@
7979
Slider(value: viewStore.binding(\.$sliderValue), in: 0...Double(viewStore.stepCount))
8080
}
8181
.disabled(viewStore.toggleIsOn)
82+
83+
Button("Reset") {
84+
viewStore.send(.resetButtonTapped)
85+
}
86+
.foregroundColor(.red)
8287
}
8388
}
8489
}

0 commit comments

Comments
 (0)