Skip to content

Commit

Permalink
Add a warning about navigationBarTranslucent without statusBarTranslu…
Browse files Browse the repository at this point in the history
…cent
  • Loading branch information
zoontek committed Oct 22, 2024
1 parent bbeb78e commit 430ea36
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 8 additions & 0 deletions packages/react-native/Libraries/Modal/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,14 @@ function confirmProps(props: Props) {
`Modal with '${props.presentationStyle}' presentation style and 'transparent' value is not supported.`,
);
}
if (
props.navigationBarTranslucent === true &&
props.statusBarTranslucent !== true
) {
console.warn(
'Modal with translucent navigation bar and without translucent status bar is not supported.',
);
}
}
}

Expand Down
10 changes: 1 addition & 9 deletions packages/rn-tester/js/examples/Modal/ModalPresentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,7 @@ import {RNTesterThemeContext} from '../../components/RNTesterTheme';
import RNTOption from '../../components/RNTOption';
import * as React from 'react';
import {useCallback, useContext, useState} from 'react';
import {
Modal,
Platform,
StatusBar,
StyleSheet,
Switch,
Text,
View,
} from 'react-native';
import {Modal, Platform, StyleSheet, Switch, Text, View} from 'react-native';

const animationTypes = ['slide', 'none', 'fade'];
const presentationStyles = [
Expand Down

0 comments on commit 430ea36

Please sign in to comment.