Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

sync-button.tsx 711B

123456789101112131415161718192021222324252627
  1. 'use client'
  2. import type { FC } from 'react'
  3. import React from 'react'
  4. import { RiRefreshLine } from '@remixicon/react'
  5. import cn from '@/utils/classnames'
  6. import TooltipPlus from '@/app/components/base/tooltip'
  7. type Props = {
  8. className?: string,
  9. popupContent?: string,
  10. onClick: () => void
  11. }
  12. const SyncButton: FC<Props> = ({
  13. className,
  14. popupContent = '',
  15. onClick,
  16. }) => {
  17. return (
  18. <TooltipPlus popupContent={popupContent}>
  19. <div className={cn(className, 'cursor-pointer select-none rounded-md p-1 hover:bg-state-base-hover')} onClick={onClick}>
  20. <RiRefreshLine className='h-4 w-4 text-text-tertiary' />
  21. </div>
  22. </TooltipPlus>
  23. )
  24. }
  25. export default React.memo(SyncButton)