mirror of
				https://github.com/langgenius/dify.git
				synced 2025-10-31 19:03:09 +00:00 
			
		
		
		
	 7709d9df20
			
		
	
	
		7709d9df20
		
			
		
	
	
	
	
		
			
			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)
 |