Skip to content

Commit e1add4f

Browse files
improve slider docs
1 parent b4fbd90 commit e1add4f

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

Sources/ComponentsKit/Components/Slider/Models/SliderVM.swift

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,32 @@ public struct SliderVM: ComponentVM {
77
/// Defaults to `.accent`.
88
public var color: ComponentColor = .accent
99

10-
/// The visual style of the slider component.
10+
/// The corner radius of the slider track and handle.
1111
///
12-
/// Defaults to `.light`.
13-
public var style: Style = .light
12+
/// Defaults to `.full`.
13+
public var cornerRadius: ComponentRadius = .full
1414

15-
/// The size of the slider.
16-
///
17-
/// Defaults to `.medium`.
18-
public var size: ComponentSize = .medium
15+
/// The maximum value of the slider.
16+
public var maxValue: CGFloat = 100
1917

2018
/// The minimum value of the slider.
2119
public var minValue: CGFloat = 0
2220

23-
/// The maximum value of the slider.
24-
public var maxValue: CGFloat = 100
25-
26-
/// The corner radius of the slider track and handle.
21+
/// The size of the slider.
2722
///
28-
/// Defaults to `.full`.
29-
public var cornerRadius: ComponentRadius = .full
23+
/// Defaults to `.medium`.
24+
public var size: ComponentSize = .medium
3025

3126
/// The step value for the slider.
3227
///
3328
/// Defaults to `1`.
3429
public var step: CGFloat = 1
3530

31+
/// The visual style of the slider component.
32+
///
33+
/// Defaults to `.light`.
34+
public var style: Style = .light
35+
3636
/// Initializes a new instance of `SliderVM` with default values.
3737
public init() {}
3838
}

Sources/ComponentsKit/Components/Slider/SUSlider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import SwiftUI
22

3-
/// A SwiftUI component that displays a slider.
3+
/// A SwiftUI component that lets users select a value from a range by dragging a thumb along a track.
44
public struct SUSlider: View {
55
// MARK: - Properties
66

Sources/ComponentsKit/Components/Slider/UKSlider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import AutoLayout
22
import UIKit
33

4-
/// A UIKit component that displays a slider.
4+
/// A UIKit component that lets users select a value from a range by dragging a thumb along a track.
55
open class UKSlider: UIView, UKComponent {
66
// MARK: - Properties
77

0 commit comments

Comments
 (0)