Skip to content

Commit

Permalink
Enforce StatusBarManger module aligns with Spec (microsoft#13556)
Browse files Browse the repository at this point in the history
* Enforce StatusBarManger module aligns with Spec

* format

* Change files

* fix
  • Loading branch information
acoates-ms authored Aug 13, 2024
1 parent 1b4f560 commit b0285c8
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": "prerelease",
"comment": "Enforce StatusBarManger module aligns with Spec",
"packageName": "react-native-windows",
"email": "[email protected]",
"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 b0285c8

Please sign in to comment.