react-native-bottom-sheet icon indicating copy to clipboard operation
react-native-bottom-sheet copied to clipboard

[v4] | [v2] Does BottomSheetView work with nativewind?

Open icon2341 opened this issue 10 months ago • 1 comments

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

  1. Create BottomSheetView Component
  2. Install and test Native wind to ensure it is working correctly

Describe what you expected to happen:

  1. The background color of the component should be bg-black-400

Reproducible sample code

<BottomSheetView style={{padding: 10, height: '100%'}} className={"bg-black-400"}>

icon2341 avatar Apr 20 '24 07:04 icon2341

I have this issue with some BottomSheet components as well. You can use const BottomSheetView = styled(LibBottomSheetView)

XantreDev avatar May 01 '24 12:05 XantreDev

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.

github-actions[bot] avatar Jun 01 '24 09:06 github-actions[bot]

Nativewind v4 does not have a styled() function anymore. Has anyone got this working in Nativewind v4 yet?

daybreaker avatar Jul 01 '24 20:07 daybreaker

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

XantreDev avatar Jul 02 '24 08:07 XantreDev

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

daybreaker avatar Oct 04 '24 16:10 daybreaker