Skip to content

Commit 0bb0066

Browse files
authored
add methods to StatusBar (#505)
1 parent 8055955 commit 0bb0066

2 files changed

Lines changed: 52 additions & 0 deletions

File tree

‎reason-react-native/src/components/StatusBar.md‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,30 @@ external make:
2424
React.element =
2525
"StatusBar";
2626
27+
[@bs.module "react-native"] [@bs.scope "StatusBar"]
28+
external setHidden: (bool, [@bs.string] [ | `none | `fade | `slide]) => unit =
29+
"";
30+
31+
[@bs.module "react-native"] [@bs.scope "StatusBar"]
32+
external setBarStyle:
33+
(
34+
[@bs.string] [
35+
| `default
36+
| [@bs.as "light-content"] `lightContent
37+
| [@bs.as "dark-content"] `darkContent
38+
],
39+
bool
40+
) =>
41+
unit =
42+
"";
43+
44+
[@bs.module "react-native"] [@bs.scope "StatusBar"]
45+
external setNetworkActivityIndicatorVisible: bool => unit = "";
46+
47+
[@bs.module "react-native"] [@bs.scope "StatusBar"]
48+
external setBackgroundColor: (Color.t, bool) => unit = "";
49+
50+
[@bs.module "react-native"] [@bs.scope "StatusBar"]
51+
external setTranslucent: bool => unit = "";
52+
2753
```

‎reason-react-native/src/components/StatusBar.re‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,29 @@ external make:
1616
) =>
1717
React.element =
1818
"StatusBar";
19+
20+
[@bs.module "react-native"] [@bs.scope "StatusBar"]
21+
external setHidden: (bool, [@bs.string] [ | `none | `fade | `slide]) => unit =
22+
"";
23+
24+
[@bs.module "react-native"] [@bs.scope "StatusBar"]
25+
external setBarStyle:
26+
(
27+
[@bs.string] [
28+
| `default
29+
| [@bs.as "light-content"] `lightContent
30+
| [@bs.as "dark-content"] `darkContent
31+
],
32+
bool
33+
) =>
34+
unit =
35+
"";
36+
37+
[@bs.module "react-native"] [@bs.scope "StatusBar"]
38+
external setNetworkActivityIndicatorVisible: bool => unit = "";
39+
40+
[@bs.module "react-native"] [@bs.scope "StatusBar"]
41+
external setBackgroundColor: (Color.t, bool) => unit = "";
42+
43+
[@bs.module "react-native"] [@bs.scope "StatusBar"]
44+
external setTranslucent: bool => unit = "";

0 commit comments

Comments
 (0)