expo / react-native-action-sheet

A cross-platform ActionSheet for React Native
MIT License
1.37k stars 224 forks source link

Fix connectActionSheet to exclude ActionSheetProps from return type #316

Closed keima closed 5 months ago

keima commented 11 months ago

The modification addresses an issue where react-navigation does not accept Screen components with props other than route and navigation, creating a problem since Screen components passing through connectActionSheet demand the showActionSheetWithOptions prop as dictated by ActionSheetProps.

The value of showActionSheetWithOptions defined in ActionSheetProps is already set within the connectActionSheet function, rendering it unnecessary in the return type. By removing ActionSheetProps from the function's output, we prevent the passing of redundant props and streamline the type definition of components involved.

keima commented 5 months ago

Thanks for merging it!

bradbyte commented 5 months ago

I'm sorry it took so long 🤕