From 704842cca4c0f628571878a68180951656bbd317 Mon Sep 17 00:00:00 2001 From: Joey Hotz Date: Mon, 13 Nov 2023 13:44:54 +1100 Subject: [PATCH] fix: update snapPoint prop type --- src/components/bottomSheet/types.d.ts | 5 ++++- src/components/bottomSheetContainer/BottomSheetContainer.tsx | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/bottomSheet/types.d.ts b/src/components/bottomSheet/types.d.ts index b9cca0930..61d4f9f68 100644 --- a/src/components/bottomSheet/types.d.ts +++ b/src/components/bottomSheet/types.d.ts @@ -38,7 +38,10 @@ export interface BottomSheetProps * snapPoints={['%100']} * @type Array */ - snapPoints: Array | SharedValue>; + snapPoints?: + | Array + | SharedValue> + | Readonly<(string | number)[] | SharedValue<(string | number)[]>>; /** * Defines how violently sheet has to be stopped while over dragging. * @type number diff --git a/src/components/bottomSheetContainer/BottomSheetContainer.tsx b/src/components/bottomSheetContainer/BottomSheetContainer.tsx index 54eab00b6..ffcd5448a 100644 --- a/src/components/bottomSheetContainer/BottomSheetContainer.tsx +++ b/src/components/bottomSheetContainer/BottomSheetContainer.tsx @@ -54,7 +54,8 @@ function BottomSheetContainerComponent({ right: 0, bottom: Math.max( 0, - WINDOW_HEIGHT - ((pageY ?? 0) + height + (StatusBar.currentHeight ?? 0)) + WINDOW_HEIGHT - + ((pageY ?? 0) + height + (StatusBar.currentHeight ?? 0)) ), }; }