dify/web/app/components/base/button/add-button.tsx

23 lines
527 B
TypeScript
Raw Permalink Normal View History

'use client'
import type { FC } from 'react'
import React from 'react'
2024-06-20 11:05:08 +08:00
import { RiAddLine } from '@remixicon/react'
import cn from '@/utils/classnames'
type Props = {
className?: string
onClick: () => void
}
const AddButton: FC<Props> = ({
className,
onClick,
}) => {
return (
<div className={cn(className, 'cursor-pointer select-none rounded-md p-1 hover:bg-state-base-hover')} onClick={onClick}>
<RiAddLine className='h-4 w-4 text-text-tertiary' />
</div>
)
}
export default React.memo(AddButton)