Repository URL to install this package:
|
Version:
4.0.61 ▾
|
import React from 'react'
import { BackToTopParent } from './styled'
import BreedBase from './breed/base'
import WithIcon from './breed/WithIcon'
import { Props } from './typings'
class BackToTop extends React.Component<Props> {
static defaultProps = {
breedType: 'with-icon',
}
render() {
const { breedType } = this.props
const children = breedType === 'with-icon' ? <WithIcon /> : <BreedBase />
return <BackToTopParent>{children}</BackToTopParent>
}
}
export { BackToTop }
export default BackToTop