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

How to change the pressColor of a drawer menu item? #11836

Closed
3 of 11 tasks
victorwpbastos opened this issue Feb 21, 2024 · 5 comments
Closed
3 of 11 tasks

How to change the pressColor of a drawer menu item? #11836

victorwpbastos opened this issue Feb 21, 2024 · 5 comments

Comments

@victorwpbastos
Copy link

Current behavior

When I press a drawer menu item the background becomes dark gray. I want to change this color. I see in the docs that the DrawerItem component receives a prop called pressColor, but I didn't find a way to pass this prop. How can I change this pressColor prop to another color?

To test the behavior, just open the provided snack and do a long press on some drawer menu item. The background color is always dark gray.

Expected behavior

I should be able to change the pressColor to another color of my choice.

Reproduction

https://snack.expo.dev/@victorwpbastos/drawer-presscolor

Platform

  • Android
  • iOS
  • Web
  • Windows
  • MacOS

Packages

  • @react-navigation/bottom-tabs
  • @react-navigation/drawer
  • @react-navigation/material-top-tabs
  • @react-navigation/stack
  • @react-navigation/native-stack
  • react-native-tab-view

Environment

  • [] I've removed the packages that I don't use
package version
@react-navigation/native 6.1.7
@react-navigation/drawer 6.6.3
@react-navigation/stack 6.3.21
react-native-safe-area-context 4.6.3
react-native-screens 3.22.0
react-native-gesture-handler 2.12.0
react-native-reanimated 3.3.0
react-native 0.72.6
expo 49.0.7
node 20.9
npm or yarn yarn
Copy link

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

  • @react-navigation/native (found: 6.1.7, latest: 6.1.10)
  • @react-navigation/drawer (found: 6.6.3, latest: 6.6.7)

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

@victorwpbastos
Copy link
Author

Yes. The behavior persists on the latest version of @react-navigation/drawer.

Copy link

Hey! Thanks for opening the issue. The issue tracker is intended for only tracking bug reports. This helps us prioritize fixing bugs in the library. Seems you have a usage question or an issue unrelated to this library. Please ask the question on StackOverflow instead using the react-navigation label. You can also chat with other community members on Reactiflux Discord server in the #help-react-native channel.

If you believe that this is actually a bug in the library, please open a new issue and fill the issue template with relevant information.

@satya164 satya164 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 2024
@victorwpbastos
Copy link
Author

For me it's a bug. If I can't change the pressColor, I believe it's a bug.

Copy link

Hey! This issue is closed and isn't watched by the core team. You are welcome to discuss the issue with others in this thread, but if you think this issue is still valid and needs to be tracked, please open a new issue with a repro.

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

No branches or pull requests

2 participants