# All files / Transition Transition.type.ts

0% Statements 0/2
100% Branches 0/0
100% Functions 0/0
0% Lines 0/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
    45
    46
    47
    48
    49

     import * as PropTypes from 'prop-types'
    import { Style } from 'jss'
    import { CSSTransitionProps } from 'react-transition-group/CSSTransition'
    import { FlattenSimpleInterpolation } from '../styles/styled'

    export type TransitionClassProps = 'root' | 'fade' | 'zoom' | 'slide' | 'collapse' | 'grow'

    export type TransitionType = 'fade' | 'zoom' | 'slide' | 'collapse' | 'grow' | 'custom'

    export interface TransitionProps extends Omit<CSSTransitionProps, 'in'> {
      children: React.ReactElement
      type?: TransitionType
      visible?: boolean
      wrapper?: boolean
      custom?: Style
    }

    export interface StyledContainerProps {
      children: React.ReactElement
      forwardRef: React.Ref<HTMLDivElement>
      type?: TransitionType
      visible?: boolean
      wrapper?: boolean
      wrapperHeight: number
      setWrapperHeight: React.Dispatch<number>
      custom?: FlattenSimpleInterpolation
    }

    export const TransitionPropTypes = {
      children: PropTypes.element.isRequired,
      type: PropTypes.oneOf<TransitionType>(['fade', 'zoom', 'slide', 'collapse', 'grow', 'custom']),
      visible: PropTypes.bool,
      wrapper: PropTypes.bool,
      custom: PropTypes.any,
      mountOnEnter: PropTypes.bool,
      unmountOnExit: PropTypes.bool,
      appear: PropTypes.bool,
      enter: PropTypes.bool,
      exit: PropTypes.bool,
      timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.object]),
      addEndListener: PropTypes.func,
      onEnter: PropTypes.func,
      onEntering: PropTypes.func,
      onEntered: PropTypes.func,
      onExit: PropTypes.func,
      onExiting: PropTypes.func,
      onExited: PropTypes.func
    }