All files / src/react-parallax-tilt defaultProps.ts

100% Statements 32/32
100% Branches 0/0
100% Functions 0/0
100% Lines 32/32

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          1x 1x 1x 1x 1x 1x 1x 1x   1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x   1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x  
import { GlareProps } from 'features/glare/types.public';
import { TiltProps } from 'features/tilt/types.public';
 
import { ReactParallaxTiltProps } from './types.public';
 
const defaultGlareProps: GlareProps = {
  glareEnable: false,
  glareMaxOpacity: 0.7,
  glareColor: '#ffffff',
  glarePosition: 'bottom',
  glareReverse: false,
  glareBorderRadius: '0',
};
 
const defaultTiltProps: TiltProps = {
  tiltEnable: true,
  tiltReverse: false,
  tiltAngleXInitial: 0,
  tiltAngleYInitial: 0,
  tiltMaxAngleX: 20,
  tiltMaxAngleY: 20,
  tiltAxis: undefined,
  tiltAngleXManual: null,
  tiltAngleYManual: null,
};
 
export const defaultProps: ReactParallaxTiltProps = {
  scale: 1,
  perspective: 1000,
  flipVertically: false,
  flipHorizontally: false,
  reset: true,
  transitionEasing: 'cubic-bezier(.03,.98,.52,.99)',
  transitionSpeed: 400,
  trackOnWindow: false,
  gyroscope: false,
  ...defaultTiltProps,
  ...defaultGlareProps,
};