Skip to content

Commit d4bf814

Browse files
remove Binding from currentValue in SUProgressBar
1 parent fa88454 commit d4bf814

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Examples/DemosApp/DemosApp/ComponentsPreview/PreviewPages/ProgressBarPreview.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ struct ProgressBarPreview: View {
2626
}
2727
}
2828
PreviewWrapper(title: "SwiftUI") {
29-
SUProgressBar(currentValue: self.$currentValue, model: self.model)
29+
SUProgressBar(currentValue: self.currentValue, model: self.model)
3030
}
3131
Form {
3232
ComponentColorPicker(selection: self.$model.color)

Sources/ComponentsKit/Components/ProgressBar/SUProgressBar.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ public struct SUProgressBar: View {
66

77
/// A model that defines the appearance properties.
88
public var model: ProgressBarVM
9-
/// A binding to control the current value.
10-
@Binding public var currentValue: CGFloat
9+
/// The current progress value.
10+
public var currentValue: CGFloat
1111

1212
private var progress: CGFloat {
1313
self.model.progress(for: self.currentValue)
@@ -17,13 +17,13 @@ public struct SUProgressBar: View {
1717

1818
/// Initializer.
1919
/// - Parameters:
20-
/// - currentValue: A binding to the current value.
20+
/// - currentValue: The current progress value.
2121
/// - model: A model that defines the appearance properties.
2222
public init(
23-
currentValue: Binding<CGFloat>,
23+
currentValue: CGFloat,
2424
model: ProgressBarVM = .init()
2525
) {
26-
self._currentValue = currentValue
26+
self.currentValue = currentValue
2727
self.model = model
2828
}
2929

0 commit comments

Comments
 (0)