Skip to content

Commit 101706f

Browse files
fix(input): 🏷️ add type assertion to the web focussed style (#133)
fix(input): 🏷️ add type assertion to the web focussed style
2 parents 270df7f + d9e3ca2 commit 101706f

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/components/button/Button.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { forwardRef, useCallback } from "react";
1+
import React, { forwardRef } from "react";
22
import {
33
GestureResponderEvent,
44
Platform,
@@ -135,11 +135,10 @@ const RNButton: React.FC<Partial<ButtonProps>> = forwardRef<
135135

136136
const isButtonDisabled = props.disabled || loading;
137137

138-
const handlePress = useCallback((event: GestureResponderEvent) => {
138+
const handlePress = (event: GestureResponderEvent) => {
139139
onPress && onPress(event);
140140
hapticEnabled && hapticMedium?.();
141-
// eslint-disable-next-line react-hooks/exhaustive-deps
142-
}, []);
141+
};
143142

144143
/**
145144
* Button Prefix Component
@@ -356,7 +355,6 @@ const RNButton: React.FC<Partial<ButtonProps>> = forwardRef<
356355
);
357356

358357
RNButton.displayName = "RNButton";
359-
360358
export const Button = createComponent<Partial<ButtonProps>>(RNButton, {
361359
shouldMemo: true,
362360
});

src/components/input/Input.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { forwardRef, ReactNode, useMemo, useRef, useState } from "react";
2-
import { Platform, TextInputProps } from "react-native";
2+
import { Platform, TextInputProps, TextStyle } from "react-native";
33

44
import { Box, BoxProps, RNTextInput, TouchableProps } from "../../primitives";
55
import { getTextFontFamily, useTailwind, useTheme } from "../../theme";
@@ -298,7 +298,7 @@ const RNInput: React.FC<Partial<InputProps>> = forwardRef<
298298
?.color,
299299
) as string,
300300
),
301-
},
301+
} as TextStyle,
302302
})
303303
: {},
304304
styleAdapter(textInputStyle),

0 commit comments

Comments
 (0)