diff --git a/change/react-native-windows-d6d68656-5e3d-4020-9cd6-703ed3f87bfa.json b/change/react-native-windows-d6d68656-5e3d-4020-9cd6-703ed3f87bfa.json new file mode 100644 index 00000000000..06d5e0c4423 --- /dev/null +++ b/change/react-native-windows-d6d68656-5e3d-4020-9cd6-703ed3f87bfa.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "backport Enforce StatusBarManger module aligns with Spec #13556", + "packageName": "react-native-windows", + "email": "tatianakapos@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/vnext/Microsoft.ReactNative/Modules/StatusBarManager.h b/vnext/Microsoft.ReactNative/Modules/StatusBarManager.h index 53c3018ae6b..eca1b9a5b04 100644 --- a/vnext/Microsoft.ReactNative/Modules/StatusBarManager.h +++ b/vnext/Microsoft.ReactNative/Modules/StatusBarManager.h @@ -4,9 +4,30 @@ #include +#include "codegen/NativeStatusBarManagerAndroidSpec.g.h" + namespace Microsoft::ReactNative { REACT_MODULE(StatusBarManager) -struct StatusBarManager {}; +struct StatusBarManager { + using ModuleSpec = Microsoft::ReactNativeSpecs::StatusBarManagerAndroidSpec; + + REACT_GET_CONSTANTS(GetConstants) + static Microsoft::ReactNativeSpecs::StatusBarManagerAndroidSpec_Constants GetConstants() noexcept { + return {0}; + } + + REACT_METHOD(setColor) + static void setColor(double /*color*/, bool /*animated*/) noexcept {} + + REACT_METHOD(setTranslucent) + static void setTranslucent(bool /*translucent*/) noexcept {} + + REACT_METHOD(setStyle) + static void setStyle(std::optional /*statusBarStyle*/) noexcept {} + + REACT_METHOD(setHidden) + static void setHidden(bool /*hidden*/) noexcept {} +}; } // namespace Microsoft::ReactNative