Skip to content

Commit 4e9d66d

Browse files
authored
Dialog - BG and overlay should not be static (#2808)
1 parent 35d1849 commit 4e9d66d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/incubator/Dialog/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import DialogHeader from './DialogHeader';
2727
import {DialogProps, DialogDirections, DialogDirectionsEnum, DialogHeaderProps} from './types';
2828
export {DialogProps, DialogDirections, DialogDirectionsEnum, DialogHeaderProps};
2929

30-
const DEFAULT_OVERLAY_BACKGROUND_COLOR = Colors.rgba(Colors.$backgroundInverted, 0.3);
3130
const THRESHOLD_VELOCITY = 750;
3231

3332
export interface DialogStatics {
@@ -55,7 +54,7 @@ const Dialog = (props: DialogProps, ref: ForwardedRef<DialogImperativeMethods>)
5554
testID,
5655
children
5756
} = props;
58-
const {overlayBackgroundColor = DEFAULT_OVERLAY_BACKGROUND_COLOR, ...otherModalProps} = modalProps;
57+
const {overlayBackgroundColor = Colors.rgba(Colors.$backgroundInverted, 0.3), ...otherModalProps} = modalProps;
5958

6059
const visibility = useSharedValue(0); // value between 0 (closed) and 1 (open)
6160
const initialTranslation = useSharedValue(0);
@@ -140,6 +139,7 @@ const Dialog = (props: DialogProps, ref: ForwardedRef<DialogImperativeMethods>)
140139
const style = useMemo(() => {
141140
return [
142141
styles.defaultDialogStyle,
142+
{backgroundColor: Colors.$backgroundDefault},
143143
containerStyle,
144144
animatedStyle,
145145
width ? {width} : undefined,
@@ -248,7 +248,6 @@ export default asBaseComponent<DialogProps, DialogStatics>(_Dialog);
248248
const styles = StyleSheet.create({
249249
defaultDialogStyle: {
250250
marginBottom: Spacings.s5,
251-
backgroundColor: Colors.$backgroundDefault,
252251
maxHeight: '60%',
253252
width: 250,
254253
borderRadius: BorderRadiuses.br20,

0 commit comments

Comments
 (0)