Skip to content

Commit

Permalink
Add statusBarTranslucent prop
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasjunior committed Apr 17, 2023
1 parent 84c99b9 commit 9a2a8e1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# React Native Simple Dialogs

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

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

Expand Down Expand Up @@ -71,14 +71,15 @@ import { Dialog } from 'react-native-simple-dialogs';
| onShow | Function | null | Callback that's called once the modal has been shown |
| onOrientationChange | Function | null | Callback that's called when the orientation change while the modal is being displayed on iOS |
| 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) |
| 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) |
| onTouchOutside | Function | null | Callbac that's called when users tap outside the shown modal |
| title | String | null | Modal's title |
| titleStyle | [Text StyleSheet](https://facebook.github.io/react-native/docs/text-style-props) | null | Custom text style object for modal's title |
| dialogStyle | [View StyleSheet](https://facebook.github.io/react-native/docs/view-style-props) | null | Custom view style for dialog box |
| contentStyle | [View StyleSheet](https://facebook.github.io/react-native/docs/view-style-props) | null | Custom view style for dialog content wrapper |
| buttonsStyle | [View StyleSheet](https://facebook.github.io/react-native/docs/view-style-props) | null | Custom view style for dialog button wrapper |
| overlayStyle | [View StyleSheet](https://facebook.github.io/react-native/docs/view-style-props) | null | Custom view style for dialog overlay |
| buttons | React Component | null | Modal button component |
| buttons | React Node | null | Modal button component |
| 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) |
| 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) |

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

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

[![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)

## Licence
## License

```
The MIT License (MIT)
Copyright (c) 2017 Douglas Nassif Roma Junior
```

See the full [licence file](https://github.com/douglasjunior/react-native-simple-dialogs/blob/master/LICENSE).
See the full [license file](https://github.com/douglasjunior/react-native-simple-dialogs/blob/master/LICENSE).
5 changes: 4 additions & 1 deletion src/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export type DialogPropsType = {
onTouchOutside?: () => void;
overlayStyle?: StyleProp<ViewStyle>;
supportedOrientations?: ModalProps['supportedOrientations'];
statusBarTranslucent?: ModalProps['statusBarTranslucent'];
keyboardDismissMode?: ScrollViewProps['keyboardDismissMode'];
keyboardShouldPersistTaps?: ScrollViewProps['keyboardShouldPersistTaps'];
contentInsetAdjustmentBehavior: ScrollViewProps['contentInsetAdjustmentBehavior'];
Expand All @@ -77,6 +78,7 @@ const Dialog = ({
onTouchOutside,
overlayStyle,
supportedOrientations,
statusBarTranslucent,
keyboardDismissMode,
keyboardShouldPersistTaps,
contentInsetAdjustmentBehavior,
Expand Down Expand Up @@ -164,7 +166,8 @@ const Dialog = ({
onRequestClose={onRequestClose}
onShow={onShow}
onOrientationChange={onOrientationChange}
supportedOrientations={supportedOrientations}>
supportedOrientations={supportedOrientations}
statusBarTranslucent={statusBarTranslucent}>
<ScrollView
bounces={false}
style={{
Expand Down

0 comments on commit 9a2a8e1

Please sign in to comment.