lawnstarter / react-native-picker-select

🔽 A Picker component for React Native which emulates the native <select> interfaces for iOS and Android
https://npmjs.com/package/react-native-picker-select
MIT License
1.74k stars 497 forks source link

Add support for iOS dark mode #463

Closed sarcadass closed 12 months ago

sarcadass commented 2 years ago

I added a new prop darkTheme to have a dark theme on the picker (only on iOS). I used the same color as the native iOS picker in dark system theme when you open a <select> on the web. I wrote a test with the feature.

Preview

Picture

dark-theme-ios

Video

https://user-images.githubusercontent.com/2452603/138324017-8165abd9-2841-4653-8636-5b847eebc8cf.mp4

Test the feature

  1. Download the codeSandbox repo. I could not make a snack because I use the Appearance API of react-native in the example. To use Appearance, you need to edit the App.json if you use expo, a thing you can't do in a snack. I provided the App.json file in the codeSandbox repo.
  2. npm i && expo start
  3. Open the App with expo and open the picker, change your system theme on iOS then switch back to the App and open the picker again.

Related issue

245

cvburgess commented 2 years ago

Thank you! This would be such a big win for our team.

cvburgess commented 2 years ago

@lfkwtz is there anything i can do to help get this merged in?

sarcadass commented 2 years ago

I just made a fix to apply the proper custom styles for the light & dark themes.

luizaugustoventura commented 2 years ago

@lfkwtz is there anything i can do to help get this merged in?

You guys have any update on this PR? This would be a really important one for me and the project I'm working on 😊️

leofolive commented 2 years ago

@lawnstarter

felri commented 2 years ago

Any updates?

Zzzhuk commented 2 years ago

@lawnstarter

leofolive commented 2 years ago

Any updates? Has this repository been abandoned?

tomassvatek commented 2 years ago

Why the PR has not been merged?

stevenvz commented 2 years ago

@lawnstarter this PR has multiple approvals & would be very helpful, please merge or provide an update if you can. Thanks! :)

stevenvz commented 2 years ago

Or is @LawnStarterTeam the correct @? ^

sophie-li commented 2 years ago
sophie-li commented 2 years ago

Any updates on this, please? @LawnStarterTeam

leofolive commented 2 years ago

Any updates on this, please? @LawnStarterTeam

leofolive commented 2 years ago

Any updates? I think it's time to start a fork of this project and fix all these problems, working on it...

awibox commented 1 year ago

use npm install react-native-picker-select-updated to get dark mode