add-button.tsx 527 B

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