All files / atoms/ProgressBar/mobile ProgressBar.theme.ts

80% Statements 4/5
75% Branches 3/4
100% Functions 1/1
80% Lines 4/5

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                24x   22x   1x   1x          
import { colors } from '@sb/styles/colors';
import { ThemeColors } from '@sb/ui/components/Themes/Themes';
import { ProgressBarNativeProps } from './ProgressBar.native.types';
 
export function getProgressBarColor(
  theme: ThemeColors,
  colorVariant: ProgressBarNativeProps['color']
) {
  switch (colorVariant) {
    case 'primary':
      return colors[theme].colorTertiary;
    case 'secondary':
      return colors[theme].colorStatus_Error;
    case 'tertiary':
      return colors[theme].colorStatus_Success;
    default:
      return colors[theme].colorTertiary;
  }
}