add-button.tsx 662 B

12345678910111213141516171819202122232425262728
  1. 'use client'
  2. import type { FC } from 'react'
  3. import React from 'react'
  4. import cn from 'classnames'
  5. import { Plus } from '@/app/components/base/icons/src/vender/line/general'
  6. type Props = {
  7. className?: string
  8. text: string
  9. onClick: () => void
  10. }
  11. const AddButton: FC<Props> = ({
  12. className,
  13. text,
  14. onClick,
  15. }) => {
  16. return (
  17. <div
  18. className={cn(className, 'flex items-center h-7 justify-center bg-gray-100 hover:bg-gray-200 rounded-lg cursor-pointer text-xs font-medium text-gray-700 space-x-1')}
  19. onClick={onClick}
  20. >
  21. <Plus className='w-3.5 h-3.5' />
  22. <div>{text}</div>
  23. </div>
  24. )
  25. }
  26. export default React.memo(AddButton)