Repository URL to install this package:
Version:
0.14.1 ▾
|
import SolidArrowIcon from './SolidArrowIcon'
import ThinArrowIcon from './ThinArrowIcon'
import TwinsThinArrowIcon from './TwinsThinArrowIcon'
import UnfoldMoreIcon from './UnfoldMoreIcon'
import { DirectionType, Props } from './typings'
export function shouldAnimate(props: Props) {
const isUpOrDown = props.up || props.down
if (!isUpOrDown) {
return false
}
return props.isAnimated || props.animated
}
// returning breed based on the breedType
export function fromBreedToComponent(type: string) {
switch (type) {
case 'thin-arrow':
return ThinArrowIcon
case 'twins-thin-arrow':
return TwinsThinArrowIcon
case 'unfold-more':
return UnfoldMoreIcon
case 'solid-arrow':
default:
return SolidArrowIcon
}
}