Skip to content

Commit

Permalink
fix hitslop types
Browse files Browse the repository at this point in the history
  • Loading branch information
haileyok committed May 29, 2024
1 parent f208432 commit 6713539
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/bottomSheetTextInput/BottomSheetTextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import React, { memo, useCallback, forwardRef, useEffect } from 'react';
import { TextInput } from 'react-native-gesture-handler';
import { useBottomSheetInternal } from '../../hooks';
import type { BottomSheetTextInputProps } from './types';
import type { Insets } from 'react-native';

const BottomSheetTextInputComponent = forwardRef<
TextInput,
BottomSheetTextInputProps
>(({ onFocus, onBlur, ...rest }, ref) => {
>(({ onFocus, onBlur, hitSlop, ...rest }, ref) => {
//#region hooks
const { shouldHandleKeyboardEvents } = useBottomSheetInternal();

Expand Down Expand Up @@ -44,6 +45,7 @@ const BottomSheetTextInputComponent = forwardRef<
ref={ref}
onFocus={handleOnFocus}
onBlur={handleOnBlur}
hitSlop={hitSlop === null ? undefined : (hitSlop as Insets | undefined)}
{...rest}
/>
);
Expand Down

0 comments on commit 6713539

Please sign in to comment.