Skip to content

Commit 2104f03

Browse files
committed
refactor: cleanup TS errors
1 parent f9c48b9 commit 2104f03

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

src/components/Text/Text.native.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useId, type ComponentProps, type Ref } from "react";
1+
import { useId, type ComponentPropsWithRef } from "react";
22
import { Text as RNText } from "react-native";
33

44
import { createAnimatedComponent } from "react-native-reanimated";
@@ -13,12 +13,7 @@ const AnimatedText = createAnimatedComponent(RNText);
1313

1414
export const Text = copyComponentProperties(
1515
RNText,
16-
(
17-
p: ComponentProps<typeof AnimatedText> & {
18-
className?: string;
19-
ref?: Ref<RNText>;
20-
},
21-
) => {
16+
(p: ComponentPropsWithRef<typeof AnimatedText>) => {
2217
const componentId = useId();
2318
const styled = useStyledProps(componentId, p.className, p);
2419

src/components/View/View.native.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const AnimatedView = createAnimatedComponent(Pressable);
1313

1414
export const View = copyComponentProperties(
1515
AnimatedView,
16-
(p: ComponentProps<typeof AnimatedView> & { className?: string }) => {
16+
(p: ComponentProps<typeof AnimatedView>) => {
1717
const componentId = useId();
1818
const styled = useStyledProps(componentId, p.className, p);
1919
const ref = useDualRefs(componentId, p.ref);

0 commit comments

Comments
 (0)