react-native-skeleton-content-nonexpo icon indicating copy to clipboard operation
react-native-skeleton-content-nonexpo copied to clipboard

Add support for passing an optional container component to wrap nested children bones

Open phanghos opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. At work, I was recently faced with the challenge of creating a skeleton placeholder for some cards we show in our mobile app. Such cards need to have some shadows and, to achieve this, we rely on another package react-native-shadow-2 which ships a ShadowView component. Currently, nested children bones are wrapped in a regular View component, so it's not possible to meet such requirements. It would be great to have the possibility to pass an optional container / wrapper component when declaring the layouts

Describe the solution you'd like Add the possibility to pass optional container component and props to wrap nested children bones instead of wrapping them in a regular View

Describe alternatives you've considered None. I don't see any other workarounds

Additional context See the attached screenshot to better understand my use case and requirements. I will open a pull request with my proposal

https://github.com/alexZajac/react-native-skeleton-content-nonexpo/assets/1209351/9128f563-6fed-431c-9e67-16f7e3542b57

phanghos avatar Sep 19 '23 10:09 phanghos