Skip to content

Commit 24055ed

Browse files
authored
fix modal bg color (#2278)
* fix modal bg color * remove import * prettify
1 parent 2fa30a8 commit 24055ed

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/components/modal/index.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {BlurViewPackage} from '../../optionalDependencies';
1414
import {Constants, asBaseComponent} from '../../commons/new';
1515
import TopBar, {ModalTopBarProps} from './TopBar';
1616
import View from '../../components/view';
17-
import {Colors} from 'style';
1817

1918
const BlurView = BlurViewPackage?.BlurView;
2019

@@ -79,12 +78,7 @@ class Modal extends Component<ModalProps> {
7978
}
8079

8180
renderTouchableOverlay() {
82-
const {
83-
testID,
84-
overlayBackgroundColor = Colors.$backgroundDefault,
85-
onBackgroundPress,
86-
accessibilityLabel = 'Dismiss'
87-
} = this.props;
81+
const {testID, overlayBackgroundColor, onBackgroundPress, accessibilityLabel = 'Dismiss'} = this.props;
8882
if (_.isFunction(onBackgroundPress) || !!overlayBackgroundColor) {
8983
const isScreenReaderEnabled = Constants.accessibility.isScreenReaderEnabled;
9084
const accessibilityProps = isScreenReaderEnabled

src/incubator/expandableOverlay/index.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import TouchableOpacity, {TouchableOpacityProps} from '../../components/touchabl
44
import View from '../../components/view';
55
import Modal, {ModalProps, ModalTopBarProps} from '../../components/modal';
66
import Dialog, {DialogProps} from '../../components/dialog';
7+
import {Colors} from 'style';
78

89
export interface ExpandableOverlayMethods {
910
openExpandable: () => void;
@@ -88,7 +89,13 @@ const ExpandableOverlay = (props: ExpandableOverlayProps, ref: any) => {
8889

8990
const renderModal = () => {
9091
return (
91-
<Modal testID={`${testID}.overlay`} {...modalProps} visible={visible} onDismiss={closeExpandable}>
92+
<Modal
93+
testID={`${testID}.overlay`}
94+
overlayBackgroundColor={Colors.$backgroundDefault}
95+
{...modalProps}
96+
visible={visible}
97+
onDismiss={closeExpandable}
98+
>
9299
{showTopBar && <Modal.TopBar onDone={closeExpandable} {...topBarProps}/>}
93100
{expandableContent}
94101
</Modal>

0 commit comments

Comments
 (0)