Skip to content

Commit

Permalink
fix: updated snapPoint prop type (#1479)(by @nicolascavallin)
Browse files Browse the repository at this point in the history
* fix(bottomSheet): snapPoints type

* fix(bottomSheet): fix lint
  • Loading branch information
nicolascavallin authored Sep 10, 2023
1 parent 7330c7c commit 0b1c8cc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/components/bottomSheet/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ export interface BottomSheetProps
* snapPoints={['%100']}
* @type Array<string | number>
*/
snapPoints?: Array<string | number> | SharedValue<Array<string | number>>;
snapPoints?:
| Array<string | number>
| SharedValue<Array<string | number>>
| Readonly<(string | number)[] | SharedValue<(string | number)[]>>;
/**
* Defines how violently sheet has to be stopped while over dragging.
* @type number
Expand Down
3 changes: 2 additions & 1 deletion src/components/bottomSheetContainer/BottomSheetContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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))
),
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useGestureEventsHandlersDefault.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type GestureEventContextType = {
isScrollablePositionLocked: boolean;
};

const dismissKeyboard = Keyboard.dismiss
const dismissKeyboard = Keyboard.dismiss;

export const useGestureEventsHandlersDefault: GestureEventsHandlersHookType =
() => {
Expand Down

0 comments on commit 0b1c8cc

Please sign in to comment.