@@ -9,11 +9,12 @@ import {
9
9
Platform ,
10
10
StatusBar ,
11
11
StyleProp ,
12
+ StatusBarProps ,
12
13
} from 'react-native' ;
13
14
import Icon from '../Icon' ;
14
15
import MaskLayer from '../MaskLayer' ;
15
16
16
- export interface ScreenRootProps {
17
+ export interface ScreenRootProps extends StatusBarProps {
17
18
/**
18
19
* 无需头部导航栏
19
20
*/
@@ -49,6 +50,7 @@ export interface ScreenRootProps {
49
50
pageType ?: 'screen' | 'modal' ;
50
51
children ?: React . ReactNode ;
51
52
barStyle ?: 'default' | 'light-content' | 'dark-content' ;
53
+ statusBarProps ?: StatusBarProps ;
52
54
}
53
55
54
56
const ScreenRoot = ( props : ScreenRootProps ) => {
@@ -79,6 +81,7 @@ const ScreenRoot = (props: ScreenRootProps) => {
79
81
// 状态栏主题 default light-content dark-content
80
82
barStyle = 'dark-content' ,
81
83
headerRightStyle = { } ,
84
+ statusBarProps = { } ,
82
85
} = props ;
83
86
84
87
const isScreen = pageType === 'screen' ;
@@ -144,7 +147,7 @@ const ScreenRoot = (props: ScreenRootProps) => {
144
147
145
148
return (
146
149
< SafeAreaView style = { [ isScreen ? { } : { backgroundColor : modalBackgroundColor , ...rootStyle } , { flex : 1 } ] } >
147
- < StatusBar barStyle = { barStyle } backgroundColor = "red" translucent = { true } animated = { true } />
150
+ < StatusBar barStyle = { barStyle } backgroundColor = "red" translucent = { true } animated = { true } { ... statusBarProps } />
148
151
{ loading && (
149
152
< MaskLayer visible = { loading } opacity = { 0.3 } >
150
153
< ActivityIndicator color = "#333" size = "large" style = { { marginTop : 300 } } />
@@ -197,7 +200,7 @@ const styles = StyleSheet.create({
197
200
} ,
198
201
title : {
199
202
color : '#333' ,
200
- fontSize : 16 ,
203
+ fontSize : 17 ,
201
204
fontWeight : '600' ,
202
205
} ,
203
206
rightContainer : {
0 commit comments