add-button.tsx 624 B

123456789101112131415161718192021222324252627282930313233
  1. 'use client'
  2. import type { FC } from 'react'
  3. import React from 'react'
  4. import {
  5. RiAddLine,
  6. } from '@remixicon/react'
  7. import cn from '@/utils/classnames'
  8. import Button from '@/app/components/base/button'
  9. type Props = {
  10. className?: string
  11. text: string
  12. onClick: () => void
  13. }
  14. const AddButton: FC<Props> = ({
  15. className,
  16. text,
  17. onClick,
  18. }) => {
  19. return (
  20. <Button
  21. className={cn('w-full', className)}
  22. variant='tertiary'
  23. size='medium'
  24. onClick={onClick}
  25. >
  26. <RiAddLine className='mr-1 w-3.5 h-3.5' />
  27. <div>{text}</div>
  28. </Button>
  29. )
  30. }
  31. export default React.memo(AddButton)