All files / apps/host/src/components balloonShellStyles.ts

100% Statements 2/2
100% Branches 0/0
100% Functions 1/1
100% Lines 2/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44              6x 266x                                                                      
import type { ViewStyle } from 'react-native';
import { StyleSheet } from 'react-native';
 
import { SCREEN_WIDTH } from '@/utils/dimensions';
 
import { BALLOON_SIZE_MULTIPLIER } from '@/constants/layout';
 
export const createBalloonShellStyles = (borderWidth: number) =>
  ({
    balloonContainer: {
      width: SCREEN_WIDTH,
      aspectRatio: 1,
      justifyContent: 'center',
      alignItems: 'center',
      zIndex: 2,
    },
    balloonWrapper: {
      width: SCREEN_WIDTH * BALLOON_SIZE_MULTIPLIER,
      height: SCREEN_WIDTH * BALLOON_SIZE_MULTIPLIER,
      justifyContent: 'center',
      alignItems: 'center',
    },
    balloonBackground: {
      ...StyleSheet.absoluteFillObject,
      borderRadius: (SCREEN_WIDTH * BALLOON_SIZE_MULTIPLIER) / 2,
      transform: [{ translateX: -10 }],
    },
    balloonBorder: {
      ...StyleSheet.absoluteFillObject,
      borderRadius: (SCREEN_WIDTH * BALLOON_SIZE_MULTIPLIER) / 2,
      borderWidth,
      backgroundColor: 'transparent',
      transform: [{ translateX: 10 }],
    },
    highlight: {
      position: 'absolute',
      top: '17%',
      left: '19%',
      width: SCREEN_WIDTH * 0.08,
      height: SCREEN_WIDTH * 0.045,
      transform: [{ rotate: '-45deg' }],
    },
  }) satisfies Record<string, ViewStyle>;