@swmansion/react-native-bottom-sheet 0.9.3-next.1 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -133,6 +133,22 @@ Detents are the points to which the sheet snaps. Each detent is either a number
133
133
  (a fixed height in pixels) or `'content'` (the sheet’s content height, capped by
134
134
  the available screen height). The default detents are `[0, 'content']`.
135
135
 
136
+ Sheet children are laid out in a flex container. For a full‍-‍height
137
+ sheet, apply `flex: 1` to your sheet surface and use the
138
+ `'content'` detent:
139
+
140
+ ```tsx
141
+ <BottomSheet
142
+ // `detents` defaults to `[0, 'content']`.
143
+ index={index}
144
+ onIndexChange={setIndex}
145
+ >
146
+ <View style={{ flex: 1, backgroundColor: 'white' }}>
147
+ {/* Full-height sheet content. */}
148
+ </View>
149
+ </BottomSheet>
150
+ ```
151
+
136
152
  The `index` prop is a zero&zwj;-&zwj;based index into the `detents` array.
137
153
  `onIndexChange` and `onSettle` have different&nbsp;responsibilities:
138
154
 
@@ -228,8 +244,6 @@ product&zwj;—&zwj;[hire&nbsp;us](https://swmansion.com/contact/projects?utm_so
228
244
 
229
245
  [![](https://logo.swmansion.com/logo?color=white&variant=desktop&width=152&tag=react-native-bottom-sheet-github)](https://swmansion.com)
230
246
 
231
- [![](https://contrib.rocks/image?repo=software-mansion-labs/react-native-bottom-sheet)](https://github.com/software-mansion-labs/react-native-bottom-sheet/graphs/contributors)
232
-
233
247
  ## Sponsored by [Gobi Maps](https://www.gobimaps.com)
234
248
 
235
249
  The best of your city, all in one&nbsp;map.
@@ -392,6 +392,7 @@ public final class RNSBottomSheetHostingView: UIView {
392
392
  switch gesture.state {
393
393
  case .began:
394
394
  isPanning = true
395
+ sheetContainer.endEditing(true)
395
396
  setContentInteractionEnabled(false)
396
397
  if let handler = surfaceTouchHandler {
397
398
  handler.isEnabled = false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swmansion/react-native-bottom-sheet",
3
- "version": "0.9.3-next.1",
3
+ "version": "0.9.4",
4
4
  "description": "Provides bottom-sheet components for React Native.",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",