Skip to content

Commit 9a2a8e1

Browse files
committed
Add statusBarTranslucent prop
1 parent 84c99b9 commit 9a2a8e1

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

README.md

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# React Native Simple Dialogs
22

3-
[![Licence MIT](https://img.shields.io/badge/licence-MIT-blue.svg)](https://github.com/douglasjunior/react-native-simple-dialogs/blob/master/LICENSE)
4-
[![npm version](https://img.shields.io/npm/v/react-native-simple-dialogs.svg)](https://www.npmjs.com/package/react-native-simple-dialogs)
5-
[![npm downloads](https://img.shields.io/npm/dt/react-native-simple-dialogs.svg)](#install)
3+
[![License MIT](https://img.shields.io/badge/licence-MIT-blue.svg)](https://github.com/douglasjunior/react-native-simple-dialogs/blob/master/LICENSE)
4+
[![npm version](https://img.shields.io/npm/v/react-native-simple-dialogs.svg)](https://www.npmjs.com/package/react-native-simple-dialogs?activeTab=versions)
5+
[![npm downloads](https://img.shields.io/npm/dt/react-native-simple-dialogs.svg)](https://www.npmjs.com/package/react-native-simple-dialogs)
66

77
⚛ Cross-platform React Native dialogs based on the Modal component.
88

@@ -71,14 +71,15 @@ import { Dialog } from 'react-native-simple-dialogs';
7171
| onShow | Function | null | Callback that's called once the modal has been shown |
7272
| onOrientationChange | Function | null | Callback that's called when the orientation change while the modal is being displayed on iOS |
7373
| supportedOrientations | Array of Enum('portrait', 'portrait-upside-down', 'landscape', 'landscape-left', 'landscape-right') | 'portrait' | Allowed orientation while modals is being shown. More info at [react-native docs](https://facebook.github.io/react-native/docs/modal#supportedorientations) |
74+
| statusBarTranslucent | Boolean | null | Determines whether your modal should go under the system statusbar. More info at [react-native docs](https://facebook.github.io/react-native/docs/modal#statusbartranslucent-android) |
7475
| onTouchOutside | Function | null | Callbac that's called when users tap outside the shown modal |
7576
| title | String | null | Modal's title |
7677
| titleStyle | [Text StyleSheet](https://facebook.github.io/react-native/docs/text-style-props) | null | Custom text style object for modal's title |
7778
| dialogStyle | [View StyleSheet](https://facebook.github.io/react-native/docs/view-style-props) | null | Custom view style for dialog box |
7879
| contentStyle | [View StyleSheet](https://facebook.github.io/react-native/docs/view-style-props) | null | Custom view style for dialog content wrapper |
7980
| buttonsStyle | [View StyleSheet](https://facebook.github.io/react-native/docs/view-style-props) | null | Custom view style for dialog button wrapper |
8081
| overlayStyle | [View StyleSheet](https://facebook.github.io/react-native/docs/view-style-props) | null | Custom view style for dialog overlay |
81-
| buttons | React Component | null | Modal button component |
82+
| buttons | React Node | null | Modal button component |
8283
| keyboardDismissMode | Enum('none', 'on-drag', 'interactive') | null | [Determines whether the keyboard gets dismissed in response to a drag.](https://facebook.github.io/react-native/docs/scrollview#keyboarddismissmode) |
8384
| keyboardShouldPersistTaps | Enum('always', 'never', 'handled', false, true) | null | [Determines when the keyboard should stay visible after a tap.](https://facebook.github.io/react-native/docs/scrollview#keyboardshouldpersisttaps) |
8485

@@ -155,10 +156,10 @@ import { ProgressDialog } from 'react-native-simple-dialogs';
155156
| Name | Type | Default | Description |
156157
| ---------------------- | -------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------- |
157158
| ...{Dialog.props} | Dialog Props | null | Same props as Dialog Component |
158-
| message | String | **REQUIRED** | Message shown in the progress dialog |
159+
| message | String | null | Message shown in the progress dialog |
159160
| messageStyle | [Text StyleSheet](https://facebook.github.io/react-native/docs/text-style-props) | null | Custom text style for message |
160-
| activityIndicatorColor | color | 'gray' | The foreground color of the spinner |
161-
| activityIndicatorSize | enum('small', 'large'), number | 'small' | Size of the indicator. Number only supported on Android |
161+
| activityIndicatorColor | color | null | The foreground color of the spinner |
162+
| activityIndicatorSize | enum('small', 'large'), number | null | Size of the indicator. Number only supported on Android |
162163
| activityIndicatorStyle | [View StyleSheet](https://facebook.github.io/react-native/docs/view-style-props) | null | Custom style for the activity indicator |
163164

164165
More info on the [sample project](https://github.com/douglasjunior/react-native-simple-dialogs/blob/master/Sample/src/App.js).
@@ -174,12 +175,12 @@ New features, bug fixes and improvements are welcome! For questions and suggesti
174175

175176
[![Star History Chart](https://api.star-history.com/svg?repos=douglasjunior/react-native-simple-dialogs&type=Date)](https://star-history.com/#douglasjunior/react-native-simple-dialogs)
176177

177-
## Licence
178+
## License
178179

179180
```
180181
The MIT License (MIT)
181182
182183
Copyright (c) 2017 Douglas Nassif Roma Junior
183184
```
184185

185-
See the full [licence file](https://github.com/douglasjunior/react-native-simple-dialogs/blob/master/LICENSE).
186+
See the full [license file](https://github.com/douglasjunior/react-native-simple-dialogs/blob/master/LICENSE).

src/Dialog.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export type DialogPropsType = {
5656
onTouchOutside?: () => void;
5757
overlayStyle?: StyleProp<ViewStyle>;
5858
supportedOrientations?: ModalProps['supportedOrientations'];
59+
statusBarTranslucent?: ModalProps['statusBarTranslucent'];
5960
keyboardDismissMode?: ScrollViewProps['keyboardDismissMode'];
6061
keyboardShouldPersistTaps?: ScrollViewProps['keyboardShouldPersistTaps'];
6162
contentInsetAdjustmentBehavior: ScrollViewProps['contentInsetAdjustmentBehavior'];
@@ -77,6 +78,7 @@ const Dialog = ({
7778
onTouchOutside,
7879
overlayStyle,
7980
supportedOrientations,
81+
statusBarTranslucent,
8082
keyboardDismissMode,
8183
keyboardShouldPersistTaps,
8284
contentInsetAdjustmentBehavior,
@@ -164,7 +166,8 @@ const Dialog = ({
164166
onRequestClose={onRequestClose}
165167
onShow={onShow}
166168
onOrientationChange={onOrientationChange}
167-
supportedOrientations={supportedOrientations}>
169+
supportedOrientations={supportedOrientations}
170+
statusBarTranslucent={statusBarTranslucent}>
168171
<ScrollView
169172
bounces={false}
170173
style={{

0 commit comments

Comments
 (0)