Skip to content

Commit 5db1d89

Browse files
committed
chore: updated internal types
1 parent 3733862 commit 5db1d89

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

src/components/bottomSheet/BottomSheet.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import React, {
77
memo,
88
useEffect,
99
} from 'react';
10-
import { Platform } from 'react-native';
10+
import { type Insets, Platform } from 'react-native';
1111
import { State } from 'react-native-gesture-handler';
1212
import Animated, {
1313
useAnimatedReaction,
@@ -48,7 +48,7 @@ import {
4848
useReactiveSharedValue,
4949
useScrollable,
5050
} from '../../hooks';
51-
import type { BottomSheetMethods, Insets } from '../../types';
51+
import type { BottomSheetMethods } from '../../types';
5252
import {
5353
animate,
5454
getKeyboardAnimationConfigs,
@@ -204,7 +204,7 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
204204
}, [topInset, bottomInset, $modal, _animatedContainerHeight]);
205205
const animatedContainerOffset = useReactiveSharedValue(
206206
_providedContainerOffset ?? INITIAL_CONTAINER_OFFSET
207-
) as SharedValue<Insets>;
207+
) as SharedValue<Required<Insets>>;
208208
const animatedHandleHeight = useReactiveSharedValue<number>(
209209
INITIAL_HANDLE_HEIGHT
210210
);
@@ -388,7 +388,7 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
388388
isInTemporaryPosition,
389389
keyboardBehavior,
390390
]);
391-
const animatedScrollableState = useDerivedValue(() => {
391+
const animatedScrollableState = useDerivedValue<SCROLLABLE_STATE>(() => {
392392
/**
393393
* if user had disabled content panning gesture, then we unlock
394394
* the scrollable state.

src/components/bottomSheetContainer/types.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export interface BottomSheetContainerProps
88
Pick<BottomSheetProps, 'topInset' | 'bottomInset' | 'detached'>
99
> {
1010
containerHeight: SharedValue<number>;
11-
containerOffset: SharedValue<Insets>;
11+
containerOffset: SharedValue<Required<Insets>>;
1212
shouldCalculateHeight?: boolean;
1313
style?: StyleProp<ViewStyle>;
1414
children?: ReactNode;

src/types.d.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,6 @@ export type ScrollableEvent = (
126126

127127
//#region utils
128128
export type Primitive = string | number | boolean;
129-
export interface Insets {
130-
top: number;
131-
bottom: number;
132-
left: number;
133-
right: number;
134-
}
135129
//#endregion
136130

137131
//#region hooks

0 commit comments

Comments
 (0)