Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix status bar color when modal/popover is open #9312

Merged
merged 3 commits into from
Jun 6, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 the modal should go under the system statusbar */
statusBarTranslucent: PropTypes.bool,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tushu17 this should be moved to modalPropTypes.js because external modals will be setting this prop.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made the changes.

};

const defaultProps = {
...modalDefaultProps,
forwardedRef: () => {},
statusBarTranslucent: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this as well

};

class BaseModal extends PureComponent {
Expand Down Expand Up @@ -112,6 +116,7 @@ class BaseModal extends PureComponent {
hideModalContentWhileAnimating={this.props.hideModalContentWhileAnimating}
animationInTiming={this.props.animationInTiming}
animationOutTiming={this.props.animationOutTiming}
statusBarTranslucent={this.props.statusBarTranslucent}
>
<SafeAreaInsetsContext.Consumer>
{(insets) => {
Expand Down