Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proptype for container style does not accept array #21

Closed
bobdeprez opened this issue May 5, 2020 · 3 comments
Closed

Proptype for container style does not accept array #21

bobdeprez opened this issue May 5, 2020 · 3 comments

Comments

@bobdeprez
Copy link

Hello,

The proptype for containerstyle does not accept an array, although it works, is it possible to adapt it so that also arrays are accepted for container style?

Im doing it like this:

<ActionSheet
ref={actionSheetRef}
containerStyle={[
styles.actionSheetStyle.default,
styles[props.colorMode].actionSheetStyle,
]}>

Warning: Failed prop type: Invalid prop containerStyle of type array supplied to ActionSheet, expected object.
in ActionSheet (at DropdownSheet.js:21)
in DropdownSheet (at ServiceTimesPage.js:73)

@ammarahm-ed
Copy link
Owner

@bobdeprez Yes, I will fix this in the next version. Thanks for reporting

@ammarahm-ed
Copy link
Owner

Seems like you are using older version of actionsheet I already fixed it in the latest version

@bobdeprez
Copy link
Author

bobdeprez commented May 18, 2020

Hi, I have the last version, 0.2.6: "react-native-actions-sheet": "^0.2.6",

If I look in node_modules I see for container style only the proptype object:

ActionSheet.propTypes = {
children: PropTypes.node,
CustomHeaderComponent: PropTypes.node,
CustomFooterComponent: PropTypes.node,
extraScroll: PropTypes.number,
footerAlwaysVisible: PropTypes.bool,
headerAlwaysVisible: PropTypes.bool,
containerStyle: PropTypes.object,
footerStyle: PropTypes.object,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants