File tree Expand file tree Collapse file tree 4 files changed +7
-6
lines changed
Examples/DemosApp/DemosApp/ComponentsPreview/PreviewPages
Sources/ComponentsKit/Components/Modal Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ struct BottomModalPreview: View {
6262 footer: self . $contentFooter,
6363 additionalPickers: {
6464 Toggle ( " Draggable " , isOn: self . $model. isDraggable)
65- Toggle ( " Hides On Swap " , isOn: self . $model. hidesOnSwap )
65+ Toggle ( " Hides On Swipe " , isOn: self . $model. hidesOnSwipe )
6666 }
6767 )
6868 }
Original file line number Diff line number Diff line change @@ -31,11 +31,12 @@ public struct BottomModalVM: ModalVM {
3131 /// A Boolean value indicating whether the modal should hide when it is swiped down.
3232 ///
3333 /// Defaults to `true`.
34- public var hidesOnSwap : Bool = true
34+ public var hidesOnSwipe : Bool = true
3535
3636 /// A Boolean value indicating whether the modal is draggable.
3737 ///
38- /// If `true`, the modal can be dragged vertically. Defaults to `true`.
38+ /// If `true`, the modal can be dragged vertically allowing the user to pull the modal up or down
39+ /// to interact or dismiss it. Defaults to `true`.
3940 public var isDraggable : Bool = true
4041
4142 /// The style of the overlay displayed behind the modal.
Original file line number Diff line number Diff line change @@ -48,6 +48,6 @@ public struct CenterModalVM: ModalVM {
4848 /// Defaults to `.fast`.
4949 public var transition : ModalTransition = . fast
5050
51- /// Initializes a new instance of `BottomModalVM ` with default values.
51+ /// Initializes a new instance of `CenterModalVM ` with default values.
5252 public init ( ) { }
5353}
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ enum ModalAnimation {
1010
1111 static func bottomModalOffset( _ translation: CGFloat , model: BottomModalVM ) -> CGFloat {
1212 if translation > 0 {
13- return model. hidesOnSwap
13+ return model. hidesOnSwipe
1414 ? translation
1515 : ( model. isDraggable ? Self . rubberBandClamp ( translation) : 0 )
1616 } else {
@@ -26,7 +26,7 @@ enum ModalAnimation {
2626 velocity: CGFloat ,
2727 model: BottomModalVM
2828 ) -> Bool {
29- guard model. hidesOnSwap else {
29+ guard model. hidesOnSwipe else {
3030 return false
3131 }
3232
You can’t perform that action at this time.
0 commit comments