Skip to content

Commit 6181ba6

Browse files
committed
backport Enforce StatusBarManger module aligns with Spec microsoft#13556
1 parent 1c85683 commit 6181ba6

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

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)