index.tsx 872 B

12345678910111213141516171819202122232425262728293031
  1. 'use client'
  2. import { t } from 'i18next'
  3. import { Refresh } from '../icons/src/vender/line/general'
  4. import Tooltip from '@/app/components/base/tooltip'
  5. type Props = {
  6. className?: string
  7. onClick?: () => void
  8. }
  9. const RegenerateBtn = ({ className, onClick }: Props) => {
  10. return (
  11. <div className={`${className}`}>
  12. <Tooltip
  13. popupContent={t('appApi.regenerate') as string}
  14. >
  15. <div
  16. className={'box-border p-0.5 flex items-center justify-center rounded-md bg-white cursor-pointer'}
  17. onClick={() => onClick?.()}
  18. style={{
  19. boxShadow: '0px 4px 8px -2px rgba(16, 24, 40, 0.1), 0px 2px 4px -2px rgba(16, 24, 40, 0.06)',
  20. }}
  21. >
  22. <Refresh className="p-[3.5px] w-6 h-6 text-[#667085] hover:bg-gray-50" />
  23. </div>
  24. </Tooltip>
  25. </div>
  26. )
  27. }
  28. export default RegenerateBtn