Skip to content

Commit 0b1c8cc

Browse files
fix: updated snapPoint prop type (#1479)(by @nicolascavallin)
* fix(bottomSheet): snapPoints type * fix(bottomSheet): fix lint
1 parent 7330c7c commit 0b1c8cc

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/components/bottomSheet/types.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ export interface BottomSheetProps
5050
* snapPoints={['%100']}
5151
* @type Array<string | number>
5252
*/
53-
snapPoints?: Array<string | number> | SharedValue<Array<string | number>>;
53+
snapPoints?:
54+
| Array<string | number>
55+
| SharedValue<Array<string | number>>
56+
| Readonly<(string | number)[] | SharedValue<(string | number)[]>>;
5457
/**
5558
* Defines how violently sheet has to be stopped while over dragging.
5659
* @type number

src/components/bottomSheetContainer/BottomSheetContainer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ function BottomSheetContainerComponent({
5454
right: 0,
5555
bottom: Math.max(
5656
0,
57-
WINDOW_HEIGHT - ((pageY ?? 0) + height + (StatusBar.currentHeight ?? 0))
57+
WINDOW_HEIGHT -
58+
((pageY ?? 0) + height + (StatusBar.currentHeight ?? 0))
5859
),
5960
};
6061
}

src/hooks/useGestureEventsHandlersDefault.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type GestureEventContextType = {
2121
isScrollablePositionLocked: boolean;
2222
};
2323

24-
const dismissKeyboard = Keyboard.dismiss
24+
const dismissKeyboard = Keyboard.dismiss;
2525

2626
export const useGestureEventsHandlersDefault: GestureEventsHandlersHookType =
2727
() => {

0 commit comments

Comments
 (0)