dify/web/app/components/plugins/card/base/org-info.tsx
zxhlyh 3c014f3ae5
Feat/plugins (#12547)
Co-authored-by: AkaraChen <akarachen@outlook.com>
Co-authored-by: Yi <yxiaoisme@gmail.com>
Co-authored-by: Joel <iamjoel007@gmail.com>
Co-authored-by: JzoNg <jzongcode@gmail.com>
Co-authored-by: twwu <twwu@dify.ai>
Co-authored-by: kurokobo <kuro664@gmail.com>
Co-authored-by: Hiroshi Fujita <fujita-h@users.noreply.github.com>
2025-01-09 18:47:41 +08:00

31 lines
751 B
TypeScript

import cn from '@/utils/classnames'
type Props = {
className?: string
orgName?: string
packageName: string
packageNameClassName?: string
}
const OrgInfo = ({
className,
orgName,
packageName,
packageNameClassName,
}: Props) => {
return (
<div className={cn('flex items-center h-4 space-x-0.5', className)}>
{orgName && (
<>
<span className='shrink-0 text-text-tertiary system-xs-regular'>{orgName}</span>
<span className='shrink-0 text-text-quaternary system-xs-regular'>/</span>
</>
)}
<span className={cn('shrink-0 w-0 grow truncate text-text-tertiary system-xs-regular', packageNameClassName)}>
{packageName}
</span>
</div>
)
}
export default OrgInfo