Skip to content

Commit 359d8f4

Browse files
authored
Merge pull request #73 from RonasIT/PRD-2490-fix-bottom-sheet-keyboard-input
fix: fix lint error
2 parents 6589c3e + 10d7500 commit 359d8f4

6 files changed

Lines changed: 12 additions & 45 deletions

File tree

libs/mobile/shared/ui/ui-kit/src/action-buttons-modal/component.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ToastService } from '@open-webui-react-native/shared/utils/toast-servic
66
import { AppBottomSheet } from '../bottom-sheet';
77
import { AppButton } from '../button';
88
import { AppText } from '../text';
9-
import { AppBottomSheetTextInput, AppBottomSheetTextInputRef } from '../text-input';
9+
import { BottomSheetTextInput, BottomSheetTextInputRef } from '../text-input';
1010
import { View } from '../view';
1111

1212
export type ActionButtonsModalMethods = {
@@ -37,7 +37,7 @@ export function ActionButtonsModal({
3737
}: ActionButtonsModalProps): ReactElement {
3838
const translate = useTranslation('SHARED.ACTION_BUTTONS_MODAL');
3939
const modalRef = useRef<BottomSheetModal>(null);
40-
const inputRef = useRef<AppBottomSheetTextInputRef>(null);
40+
const inputRef = useRef<BottomSheetTextInputRef>(null);
4141

4242
const [value, setValue] = useState('');
4343

@@ -82,7 +82,7 @@ export function ActionButtonsModal({
8282
) : (
8383
description
8484
))}
85-
{withInput && <AppBottomSheetTextInput
85+
{withInput && <BottomSheetTextInput
8686
ref={inputRef}
8787
value={value}
8888
onChangeText={setValue} />}

libs/mobile/shared/ui/ui-kit/src/bottom-sheet-text-input/component.tsx

Lines changed: 0 additions & 30 deletions
This file was deleted.

libs/mobile/shared/ui/ui-kit/src/bottom-sheet-text-input/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

libs/mobile/shared/ui/ui-kit/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export * from './zoom';
3131
export * from './toast';
3232
export * from './math-svg';
3333
export * from './pressable';
34-
export * from './bottom-sheet-text-input';
3534
export * from './floated-label-input';
3635
export * from './form-floated-label-input';
3736
export * from './search-input';

libs/mobile/shared/ui/ui-kit/src/search-input/component.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ import { useTranslation } from '@ronas-it/react-native-common-modules/i18n';
22
import { ReactElement } from 'react';
33
import { Platform } from 'react-native';
44
import { cn } from '@open-webui-react-native/mobile/shared/ui/styles';
5-
import { AppBottomSheetTextInput } from '../bottom-sheet-text-input';
65
import { Icon } from '../icon';
76
import { GestureAppPressable, AppPressable } from '../pressable';
87
import { AppText } from '../text';
9-
import { AppTextInput, AppInputProps } from '../text-input';
8+
import { BottomSheetTextInput, AppTextInput, AppInputProps } from '../text-input';
109
import { View } from '../view';
1110

1211
interface SearchInputProps extends AppInputProps {
@@ -25,7 +24,7 @@ export function SearchInput({
2524
}: SearchInputProps): ReactElement {
2625
const translate = useTranslation('SHARED.SEARCH_INPUT');
2726

28-
const InputComponent = isInBottomSheet ? AppBottomSheetTextInput : AppTextInput;
27+
const InputComponent = isInBottomSheet ? BottomSheetTextInput : AppTextInput;
2928

3029
//NOTE: AppPressable does not work correctly in modal on IOS, but GestureAppPressable does not work correctly in modal on Android
3130
const PressableComponent = Platform.OS === 'ios' ? GestureAppPressable : AppPressable;

libs/mobile/shared/ui/ui-kit/src/text-input/component.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BottomSheetTextInput } from '@gorhom/bottom-sheet';
1+
import { BottomSheetTextInput as BottomSheetTextInputComponent } from '@gorhom/bottom-sheet';
22
import { ComponentRef, ReactElement, Ref } from 'react';
33
import { Platform, TextInput, TextInputProps, View } from 'react-native';
44
import { cn, colors } from '@open-webui-react-native/mobile/shared/ui/styles';
@@ -55,13 +55,13 @@ export const AppTextInput = ({
5555
);
5656
};
5757

58-
export type AppBottomSheetTextInputRef = ComponentRef<typeof BottomSheetTextInput>;
58+
export type BottomSheetTextInputRef = ComponentRef<typeof BottomSheetTextInputComponent>;
5959

60-
export type AppBottomSheetInputProps = Omit<AppInputProps, 'ref'> & {
61-
ref?: Ref<AppBottomSheetTextInputRef>;
60+
export type BottomSheetTextInputProps = Omit<AppInputProps, 'ref'> & {
61+
ref?: Ref<BottomSheetTextInputRef>;
6262
};
6363

64-
export const AppBottomSheetTextInput = ({
64+
export const BottomSheetTextInput = ({
6565
onFocus,
6666
onBlur,
6767
label,
@@ -74,15 +74,15 @@ export const AppBottomSheetTextInput = ({
7474
hitSlop,
7575
ref,
7676
...inputProps
77-
}: AppBottomSheetInputProps): ReactElement => {
77+
}: BottomSheetTextInputProps): ReactElement => {
7878
const isIos = Platform.OS === 'ios';
7979

8080
return (
8181
<View className={cn(baseClasses.containerClasses, className)}>
8282
{accessoryTop}
8383
<View className={`flex-row gap-12 items-center max-h-[${maxHeight}]`}>
8484
{accessoryLeft}
85-
<BottomSheetTextInput
85+
<BottomSheetTextInputComponent
8686
ref={ref}
8787
className={cn(baseClasses.textClasses, isIos && '!leading-[0]', textClassName)}
8888
placeholderTextColor={colors.textSecondary}

0 commit comments

Comments
 (0)