remove-button.tsx 563 B

12345678910111213141516171819202122232425
  1. 'use client'
  2. import type { FC } from 'react'
  3. import React from 'react'
  4. import { RiDeleteBinLine } from '@remixicon/react'
  5. import cn from '@/utils/classnames'
  6. type Props = {
  7. className?: string
  8. onClick: (e: React.MouseEvent) => void
  9. }
  10. const Remove: FC<Props> = ({
  11. className,
  12. onClick,
  13. }) => {
  14. return (
  15. <div
  16. className={cn(className, 'p-1 cursor-pointer rounded-md hover:bg-black/5 text-gray-500 hover:text-gray-800')}
  17. onClick={onClick}
  18. >
  19. <RiDeleteBinLine className='w-4 h-4' />
  20. </div>
  21. )
  22. }
  23. export default React.memo(Remove)