mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-05-25 07:38:15 +08:00

Co-authored-by: NFish <douxc512@gmail.com> Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: jZonG <jzongcode@gmail.com>
32 lines
731 B
TypeScript
32 lines
731 B
TypeScript
'use client'
|
|
import type { FC } from 'react'
|
|
import React from 'react'
|
|
import Button from '../../base/button'
|
|
import { RiAddLine } from '@remixicon/react'
|
|
import cn from '@/utils/classnames'
|
|
import { useTranslation } from 'react-i18next'
|
|
|
|
type Props = {
|
|
className?: string
|
|
onClick?: () => void
|
|
}
|
|
|
|
const AddedMetadataButton: FC<Props> = ({
|
|
className,
|
|
onClick,
|
|
}) => {
|
|
const { t } = useTranslation()
|
|
return (
|
|
<Button
|
|
className={cn('flex w-full items-center', className)}
|
|
size='small'
|
|
variant='tertiary'
|
|
onClick={onClick}
|
|
>
|
|
<RiAddLine className='mr-1 size-3.5' />
|
|
<div>{t('dataset.metadata.addMetadata')}</div>
|
|
</Button>
|
|
)
|
|
}
|
|
export default React.memo(AddedMetadataButton)
|