react-native-bottom-sheet
react-native-bottom-sheet copied to clipboard
[v4] | [v2] Does BottomSheetView work with nativewind?
Bug
When using nativewind, this will work on most components but does not seem to work with BottomSheetViews in my testing. All I do is do className="bg-blue-500" which does not work.
Environment info
Library | Version |
---|---|
@gorhom/bottom-sheet | ^4.6.1 |
react-native | 0.73.6 |
react-native-reanimated | ~3.6.2 |
react-native-gesture-handler | ~2.14.0 |
Steps To Reproduce
- Create BottomSheetView Component
- Install and test Native wind to ensure it is working correctly
Describe what you expected to happen:
- The background color of the component should be bg-black-400
Reproducible sample code
<BottomSheetView style={{padding: 10, height: '100%'}} className={"bg-black-400"}>
I have this issue with some BottomSheet components as well. You can use const BottomSheetView = styled(LibBottomSheetView)
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Nativewind v4 does not have a styled()
function anymore. Has anyone got this working in Nativewind v4 yet?
Nativewind v4 does not have a
styled()
function anymore. Has anyone got this working in Nativewind v4 yet?
You should you remapProps in this case
In case anyone from the future stumbles on this, my problem was putting the <BottomSheetModalProvider>
before my <Theme>
wrapper in my App.js. So of course it didnt know what nativeWind was. 🤦
Sometimes it's the simple things we miss, in search of the more difficult answers