Skip to content

Commit b102786

Browse files
authored
[0.75] Backport Enforce StatusBarManger module aligns with Spec #13556 (#13568)
* backport Enforce StatusBarManger module aligns with Spec #13556 * Change files
1 parent 0afe666 commit b102786

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "backport Enforce StatusBarManger module aligns with Spec #13556",
4+
"packageName": "react-native-windows",
5+
"email": "tatianakapos@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

vnext/Microsoft.ReactNative/Modules/StatusBarManager.h

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,30 @@
44

55
#include <NativeModules.h>
66

7+
#include "codegen/NativeStatusBarManagerAndroidSpec.g.h"
8+
79
namespace Microsoft::ReactNative {
810

911
REACT_MODULE(StatusBarManager)
10-
struct StatusBarManager {};
12+
struct StatusBarManager {
13+
using ModuleSpec = Microsoft::ReactNativeSpecs::StatusBarManagerAndroidSpec;
14+
15+
REACT_GET_CONSTANTS(GetConstants)
16+
static Microsoft::ReactNativeSpecs::StatusBarManagerAndroidSpec_Constants GetConstants() noexcept {
17+
return {0};
18+
}
19+
20+
REACT_METHOD(setColor)
21+
static void setColor(double /*color*/, bool /*animated*/) noexcept {}
22+
23+
REACT_METHOD(setTranslucent)
24+
static void setTranslucent(bool /*translucent*/) noexcept {}
25+
26+
REACT_METHOD(setStyle)
27+
static void setStyle(std::optional<std::string> /*statusBarStyle*/) noexcept {}
28+
29+
REACT_METHOD(setHidden)
30+
static void setHidden(bool /*hidden*/) noexcept {}
31+
};
1132

1233
} // namespace Microsoft::ReactNative

0 commit comments

Comments
 (0)