BtnRight.tsx 530 B

123456789101112131415161718192021
  1. import React from 'react'
  2. import { baseURL } from '@/utils/http'
  3. type Props = {
  4. imgName: string
  5. clickSon: () => void
  6. title: '返回' | '跳过'
  7. }
  8. function BtnRight({ imgName, clickSon, title }: Props) {
  9. return (
  10. <div title={title} id='BtnRight' onClick={clickSon}>
  11. <img className='BtnRight1' src={`${baseURL}btn/${imgName}.png`} alt='' />
  12. <img className='BtnRight2' src={`${baseURL}btn/${imgName}Ac.png`} alt='' />
  13. </div>
  14. )
  15. }
  16. const MemoBtnRight = React.memo(BtnRight)
  17. export default MemoBtnRight