Skip to content

Commit

Permalink
fix status bar color when modal/popover is open
Browse files Browse the repository at this point in the history
  • Loading branch information
Tushu17 committed Jun 3, 2022
1 parent fd29904 commit 2efde78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/AttachmentModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ class AttachmentModal extends PureComponent {
return (
<>
<Modal
statusBarTranslucent={false}
type={this.state.modalType}
onSubmit={this.submitAndClose}
onClose={() => this.setState({isModalOpen: false})}
Expand Down
5 changes: 5 additions & 0 deletions src/components/Modal/BaseModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ const propTypes = {

/** The ref to the modal container */
forwardedRef: PropTypes.func,

/** Whether we should make status bar transclucent */
statusBarTranslucent: PropTypes.bool,
};

const defaultProps = {
...modalDefaultProps,
forwardedRef: () => {},
statusBarTranslucent: true,
};

class BaseModal extends PureComponent {
Expand Down Expand Up @@ -77,6 +81,7 @@ class BaseModal extends PureComponent {
);
return (
<ReactNativeModal
statusBarTranslucent={this.props.statusBarTranslucent}
onBackdropPress={(e) => {
if (e && e.type === 'keydown' && e.key === 'Enter') {
return;
Expand Down

0 comments on commit 2efde78

Please sign in to comment.