From fba18181ddd6040191dabc1d78ef928fcecf6560 Mon Sep 17 00:00:00 2001 From: kligarski Date: Thu, 29 May 2025 09:55:26 +0200 Subject: [PATCH 1/3] add information about statusBarStyle on Android, fix missing parenthesis typo --- guides/GUIDE_FOR_LIBRARY_AUTHORS.md | 2 +- native-stack/README.md | 2 +- src/native-stack/types.tsx | 4 +++- src/types.tsx | 4 +++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/guides/GUIDE_FOR_LIBRARY_AUTHORS.md b/guides/GUIDE_FOR_LIBRARY_AUTHORS.md index 1b9dac06be..66ae31cf43 100644 --- a/guides/GUIDE_FOR_LIBRARY_AUTHORS.md +++ b/guides/GUIDE_FOR_LIBRARY_AUTHORS.md @@ -289,7 +289,7 @@ Defaults to `false`. ### `statusBarStyle` -Sets the status bar color (similar to the `StatusBar` component). Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file. On iOS, the possible values are: `auto` (based on [user interface style](https://developer.apple.com/documentation/uikit/uiuserinterfacestyle?language=objc), `inverted` (colors opposite to `auto`), `light`, `dark`. On Android, the status bar will be dark if set to `dark` and `light` otherwise. +Sets the status bar color (similar to the `StatusBar` component). Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file. On iOS, the possible values are: `auto` (based on [user interface style](https://developer.apple.com/documentation/uikit/uiuserinterfacestyle?language=objc)), `inverted` (colors opposite to `auto`), `light`, `dark`. On Android, the status bar will be dark if set to `dark` and `light` otherwise. Defaults to `auto`. diff --git a/native-stack/README.md b/native-stack/README.md index e0832d726c..aa7a03554e 100644 --- a/native-stack/README.md +++ b/native-stack/README.md @@ -503,7 +503,7 @@ Defaults to `false`. #### `statusBarStyle` -Sets the status bar color (similar to the `StatusBar` component). On iOS, the possible values are: `auto` (based on [user interface style](https://developer.apple.com/documentation/uikit/uiuserinterfacestyle?language=objc), `inverted` (colors opposite to `auto`), `light`, `dark`. On Android, the status bar will be dark if set to `dark` and `light` otherwise. +Sets the status bar color (similar to the `StatusBar` component). On iOS, the possible values are: `auto` (based on [user interface style](https://developer.apple.com/documentation/uikit/uiuserinterfacestyle?language=objc)), `inverted` (colors opposite to `auto`), `light`, `dark`. On Android, the status bar will be dark if set to `dark` and `light` otherwise. Defaults to `auto`. diff --git a/src/native-stack/types.tsx b/src/native-stack/types.tsx index fca71bb35e..2252cf7c67 100644 --- a/src/native-stack/types.tsx +++ b/src/native-stack/types.tsx @@ -499,7 +499,9 @@ export type NativeStackNavigationOptions = { */ statusBarHidden?: boolean; /** - * Sets the status bar color (similar to the `StatusBar` component). Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. Defaults to `auto`. + * Sets the status bar color (similar to the `StatusBar` component). Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. + * `auto` and `inverted` are supported only on iOS. On Android, they will fallback to `light`. + * Defaults to `auto` on iOS and `light` on Android. */ statusBarStyle?: ScreenProps['statusBarStyle']; /** diff --git a/src/types.tsx b/src/types.tsx index f1f9f63b30..53d7bdd758 100644 --- a/src/types.tsx +++ b/src/types.tsx @@ -449,7 +449,9 @@ export interface ScreenProps extends ViewProps { */ statusBarHidden?: boolean; /** - * Sets the status bar color (similar to the `StatusBar` component). Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. Defaults to `auto`. + * Sets the status bar color (similar to the `StatusBar` component). Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. + * `auto` and `inverted` are supported only on iOS. On Android, they will fallback to `light`. + * Defaults to `auto` on iOS and `light` on Android. */ statusBarStyle?: 'inverted' | 'auto' | 'light' | 'dark'; /** From b5e464e7067aa65ac95f20fe8841c307d55ddaa6 Mon Sep 17 00:00:00 2001 From: kligarski Date: Mon, 2 Jun 2025 09:58:53 +0200 Subject: [PATCH 2/3] update statusBarAnimation docs --- src/native-stack/types.tsx | 6 +++++- src/types.tsx | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/native-stack/types.tsx b/src/native-stack/types.tsx index 2252cf7c67..0d89dece63 100644 --- a/src/native-stack/types.tsx +++ b/src/native-stack/types.tsx @@ -485,7 +485,11 @@ export type NativeStackNavigationOptions = { */ stackPresentation?: ScreenProps['stackPresentation']; /** - * Sets the status bar animation (similar to the `StatusBar` component). Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. + * Sets the status bar animation (similar to the `StatusBar` component). + * On Android, setting either `fade` or `slide` will set the transition of status bar color. On iOS, this option applies to appereance animation of the status bar. + * Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. + * + * Defaults to `fade` on iOS and `none` on Android. */ statusBarAnimation?: ScreenProps['statusBarAnimation']; /** diff --git a/src/types.tsx b/src/types.tsx index 53d7bdd758..fcb96141be 100644 --- a/src/types.tsx +++ b/src/types.tsx @@ -430,7 +430,11 @@ export interface ScreenProps extends ViewProps { */ stackPresentation?: StackPresentationTypes; /** - * Sets the status bar animation (similar to the `StatusBar` component). Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. + * Sets the status bar animation (similar to the `StatusBar` component). + * On Android, setting either `fade` or `slide` will set the transition of status bar color. On iOS, this option applies to appereance animation of the status bar. + * Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. + * + * Defaults to `fade` on iOS and `none` on Android. */ statusBarAnimation?: 'none' | 'fade' | 'slide'; /** From 986ced9e2555d7357247ef2d3ae2d8a647e2bdea Mon Sep 17 00:00:00 2001 From: kligarski Date: Mon, 2 Jun 2025 10:48:29 +0200 Subject: [PATCH 3/3] remove changes from native-stack files --- native-stack/README.md | 2 +- src/native-stack/types.tsx | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/native-stack/README.md b/native-stack/README.md index aa7a03554e..e0832d726c 100644 --- a/native-stack/README.md +++ b/native-stack/README.md @@ -503,7 +503,7 @@ Defaults to `false`. #### `statusBarStyle` -Sets the status bar color (similar to the `StatusBar` component). On iOS, the possible values are: `auto` (based on [user interface style](https://developer.apple.com/documentation/uikit/uiuserinterfacestyle?language=objc)), `inverted` (colors opposite to `auto`), `light`, `dark`. On Android, the status bar will be dark if set to `dark` and `light` otherwise. +Sets the status bar color (similar to the `StatusBar` component). On iOS, the possible values are: `auto` (based on [user interface style](https://developer.apple.com/documentation/uikit/uiuserinterfacestyle?language=objc), `inverted` (colors opposite to `auto`), `light`, `dark`. On Android, the status bar will be dark if set to `dark` and `light` otherwise. Defaults to `auto`. diff --git a/src/native-stack/types.tsx b/src/native-stack/types.tsx index 0d89dece63..fca71bb35e 100644 --- a/src/native-stack/types.tsx +++ b/src/native-stack/types.tsx @@ -485,11 +485,7 @@ export type NativeStackNavigationOptions = { */ stackPresentation?: ScreenProps['stackPresentation']; /** - * Sets the status bar animation (similar to the `StatusBar` component). - * On Android, setting either `fade` or `slide` will set the transition of status bar color. On iOS, this option applies to appereance animation of the status bar. - * Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. - * - * Defaults to `fade` on iOS and `none` on Android. + * Sets the status bar animation (similar to the `StatusBar` component). Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. */ statusBarAnimation?: ScreenProps['statusBarAnimation']; /** @@ -503,9 +499,7 @@ export type NativeStackNavigationOptions = { */ statusBarHidden?: boolean; /** - * Sets the status bar color (similar to the `StatusBar` component). Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. - * `auto` and `inverted` are supported only on iOS. On Android, they will fallback to `light`. - * Defaults to `auto` on iOS and `light` on Android. + * Sets the status bar color (similar to the `StatusBar` component). Requires enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file on iOS. Defaults to `auto`. */ statusBarStyle?: ScreenProps['statusBarStyle']; /**