dify/web/app/components/plugins/card/base/org-info.tsx

31 lines
751 B
TypeScript
Raw Permalink Normal View History

2024-10-10 10:40:26 +08:00
import cn from '@/utils/classnames'
type Props = {
className?: string
2024-10-16 16:28:07 +08:00
orgName?: string
packageName: string
packageNameClassName?: string
}
2024-10-10 10:40:26 +08:00
const OrgInfo = ({
className,
orgName,
packageName,
packageNameClassName,
}: Props) => {
2024-10-15 14:56:59 +08:00
return (
<div className={cn('flex items-center h-4 space-x-0.5', className)}>
2024-10-16 16:28:07 +08:00
{orgName && (
<>
<span className='shrink-0 text-text-tertiary system-xs-regular'>{orgName}</span>
2024-10-16 16:39:47 +08:00
<span className='shrink-0 text-text-quaternary system-xs-regular'>/</span>
2024-10-16 16:28:07 +08:00
</>
)}
2024-10-15 22:52:57 +08:00
<span className={cn('shrink-0 w-0 grow truncate text-text-tertiary system-xs-regular', packageNameClassName)}>
{packageName}
2024-10-15 14:56:59 +08:00
</span>
</div>
)
2024-10-10 10:40:26 +08:00
}
export default OrgInfo