diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ef52d0dc..0ed872fae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ BottomSheet Changelog ================== +#### v2.5.1 +- Renamed tapToDissmiss option tapToDismiss + #### v2.5.0 - Update Copyright - Update swift-tools-version diff --git a/README.md b/README.md index 33187d790..cc519f5c9 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,7 @@ struct ContentView: View { `.swipeToDismiss` Dismisses the BottomSheet when swiped down. - `.tapToDissmiss` Dismisses the BottomSheet when the background is tapped. + `.tapToDismiss` Dismisses the BottomSheet when the background is tapped. ## Custom States @@ -242,7 +242,7 @@ struct BookDetailView: View { LinearGradient(gradient: Gradient(colors: self.backgroundColors), startPoint: .topLeading, endPoint: .bottomTrailing) .edgesIgnoringSafeArea(.all) - .bottomSheet(bottomSheetPosition: self.$bottomSheetPosition, options: [.noDragIndicator, .allowContentDrag, .showCloseButton(), .swipeToDismiss, .tapToDissmiss, .absolutePositionValue], headerContent: { + .bottomSheet(bottomSheetPosition: self.$bottomSheetPosition, options: [.noDragIndicator, .allowContentDrag, .showCloseButton(), .swipeToDismiss, .tapToDismiss, .absolutePositionValue], headerContent: { //The name of the book as the heading and the author as the subtitle with a divider. VStack(alignment: .leading) { Text("Wuthering Heights") diff --git a/Sources/BottomSheet/BottomSheet.swift b/Sources/BottomSheet/BottomSheet.swift index 06368d02b..b9965746b 100644 --- a/Sources/BottomSheet/BottomSheet.swift +++ b/Sources/BottomSheet/BottomSheet.swift @@ -43,7 +43,7 @@ public struct BottomSheet { ///Dismisses the BottomSheet when swiped down. case swipeToDismiss ///Dismisses the BottomSheet when the background is tapped. - case tapToDissmiss + case tapToDismiss /** The corresponding value of the raw type. @@ -92,8 +92,8 @@ public struct BottomSheet { return "showCloseButton" case .swipeToDismiss: return "swipeToDismiss" - case .tapToDissmiss: - return "tapToDissmiss" + case .tapToDismiss: + return "tapToDismiss" } } } diff --git a/Sources/BottomSheet/BottomSheetArray.swift b/Sources/BottomSheet/BottomSheetArray.swift index 138e4d031..1ab71967a 100644 --- a/Sources/BottomSheet/BottomSheetArray.swift +++ b/Sources/BottomSheet/BottomSheetArray.swift @@ -165,6 +165,6 @@ internal extension Array where Element == BottomSheet.Options { } var tapToDismiss: Bool { - return self.contains(BottomSheet.Options.tapToDissmiss) + return self.contains(BottomSheet.Options.tapToDismiss) } }