Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/types/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Pressable, Text, View, ViewStyle } from 'react-native';
import type { Pressable, StyleProp, Text, View, ViewStyle } from 'react-native';

type ComponentPropsWithAsChild<T extends React.ElementType<any>> =
React.ComponentPropsWithoutRef<T> & { asChild?: boolean };
Expand Down Expand Up @@ -36,7 +36,7 @@ type FocusOutsideEvent = CustomEvent<{ originalEvent: FocusEvent }>;
*/
interface PositionedContentProps {
forceMount?: true | undefined;
style?: ViewStyle;
style?: StyleProp<ViewStyle>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this changes to type, the code that implements it will not handle StyleProp<ViewStyle> properly.

To make this work, every Content component that extends this type for its props needs to handle cases where it is not just a ViewStyle.

alignOffset?: number;
insets?: Insets;
avoidCollisions?: boolean;
Expand Down