dify/web/app/components/datasets/documents/detail/completed/common/add-another.tsx
Stephen Zhou a84c2d36a3
style: format with vp fmt (#38803)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-12 15:57:46 +00:00

32 lines
906 B
TypeScript

import type { FC } from 'react'
import { Checkbox } from '@langgenius/dify-ui/checkbox'
import { cn } from '@langgenius/dify-ui/cn'
import * as React from 'react'
import { useTranslation } from 'react-i18next'
type AddAnotherProps = {
className?: string
checked: boolean
onCheckedChange: (checked: boolean) => void
}
const AddAnother: FC<AddAnotherProps> = ({ className, checked, onCheckedChange }) => {
const { t } = useTranslation()
return (
<label className={cn('flex cursor-pointer items-center gap-x-1 pl-1', className)}>
<Checkbox
key="add-another-checkbox"
className="shrink-0"
checked={checked}
onCheckedChange={onCheckedChange}
/>
<span className="system-xs-medium text-text-tertiary">
{t(($) => $['segment.addAnother'], { ns: 'datasetDocuments' })}
</span>
</label>
)
}
export default React.memo(AddAnother)