You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 61c8b04
Browse filesBrowse the repository at this point in the historyBrowse files
Summary:
Adds support for `barStyle="auto"` on `StatusBar`. When set, the bar style is resolved against the current color scheme: `light-content` in dark mode, `dark-content` in light mode. The resolution re-runs when the system color scheme changes, while at least one `StatusBar` is mounted.
The behavior mirrors what `expo-status-bar` already exposes. The `'auto'` name is the one we use at Expo. It is not necessarily the right name for React Native core, happy to switch to something else if reviewers prefer.
## Changelog:
[GENERAL] [ADDED] - StatusBar: support `barStyle="auto"` to follow the current color scheme
Pull Request resolved: #56978
Test Plan:
- `yarn jest packages/react-native/Libraries/Components/StatusBar` passes, including a new test that asserts `setBarStyle('auto')` calls the native module with `dark-content` in light mode and `light-content` in dark mode.
- Play with it in the RNTester app
Reviewed By: cortinico
Differential Revision: D106535143
Pulled By: zeyap
fbshipit-source-id: eff3dea37a317f22af3364345d355908104c8c5a
0 commit comments