Skip to content

Commit

Permalink
[0.74] Backport Enforce StatusBarManger module aligns with Spec #13556 (
Browse files Browse the repository at this point in the history
#13569)

* backport Enforce StatusBarManger module aligns with Spec #13556

* Change files
  • Loading branch information
TatianaKapos committed Aug 14, 2024
1 parent 1c85683 commit 1ad3123
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "backport Enforce StatusBarManger module aligns with Spec #13556",
"packageName": "react-native-windows",
"email": "tatianakapos@microsoft.com",
"dependentChangeType": "patch"
}
23 changes: 22 additions & 1 deletion vnext/Microsoft.ReactNative/Modules/StatusBarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,30 @@

#include <NativeModules.h>

#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<std::string> /*statusBarStyle*/) noexcept {}

REACT_METHOD(setHidden)
static void setHidden(bool /*hidden*/) noexcept {}
};

} // namespace Microsoft::ReactNative

0 comments on commit 1ad3123

Please sign in to comment.