Skip to content

Commit

Permalink
fix(suite-native): fix flickering device switcher
Browse files Browse the repository at this point in the history
  • Loading branch information
vytick committed Dec 9, 2024
1 parent 034c264 commit f6fa667
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GestureResponderEvent, Modal, Pressable, StatusBar } from 'react-native';
import { Dimensions, GestureResponderEvent, Modal, Pressable, StatusBar } from 'react-native';
import { ReactNode } from 'react';
import { useSafeAreaInsets, EdgeInsets } from 'react-native-safe-area-context';
import Animated, { FadeIn, SlideInUp } from 'react-native-reanimated';
Expand All @@ -20,9 +20,15 @@ type DeviceManagerModalProps = {

export const MANAGER_MODAL_BOTTOM_RADIUS = nativeBorders.radii.r12;

const SCREEN_SIZE = Dimensions.get('screen');

const modalBackgroundOverlayStyle = prepareNativeStyle(utils => ({
flex: 1,
backgroundColor: utils.transparentize(0.3, utils.colors.backgroundNeutralBold),
// this need to be here so the background does not stretch out when appearing
// new RN architecture might fix this, so evaluate later
width: SCREEN_SIZE.width,
height: SCREEN_SIZE.height,
}));

const deviceManagerModalWrapperStyle = prepareNativeStyle(utils => ({
Expand Down

0 comments on commit f6fa667

Please sign in to comment.