import React from 'react'

import { FloatButton } from 'antd'

import { default as BackTopSvg } from 'assets/backtop.svg'

type ICustomBackTopProps = {
  style?: React.CSSProperties
  className?: string
}

const CustomBackTop: React.FC<ICustomBackTopProps> = props => {
  return (
    <FloatButton.BackTop
      style={props.style}
      className={`backtop-icon ${props.className}`}
      icon={<img src={BackTopSvg} alt="图标" className="backtop-icon-svg" />}
    />
  )
}

export default CustomBackTop
