collect-system/apps/web/src/app/main/path/components/DeptInfo.tsx

22 lines
950 B
TypeScript
Raw Normal View History

2025-02-27 10:23:04 +08:00
import { TeamOutlined } from "@ant-design/icons";
import { Typography } from "antd";
const { Title, Text } = Typography;
const DeptInfo = ({ path }) => {
return (
<div className="gap-1 flex items-center flex-grow">
<TeamOutlined className="text-blue-500 text-lg transform group-hover:scale-110 transition-transform duration-300" />
{path?.depts && path?.depts?.length > 0 ? (
<Text className="font-medium text-blue-500 hover:text-blue-600 transition-colors duration-300 truncate max-w-[120px]">
{path?.depts?.length > 1 ? `${path.depts[0].name}` : path?.depts?.[0]?.name}
</Text>
) : (
<Text className="font-medium text-blue-500 hover:text-blue-600 transition-colors duration-300 truncate max-w-[120px]">
</Text>
)}
</div>
);
};
export default DeptInfo;