2024-12-30 08:26:40 +08:00
|
|
|
import { IdcardOutlined } from "@ant-design/icons";
|
|
|
|
import React from "react";
|
|
|
|
|
|
|
|
interface IdCardProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
|
id: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default function IdCard({ id, ...rest }: IdCardProps) {
|
|
|
|
return (
|
|
|
|
<div
|
|
|
|
className="flex items-center"
|
|
|
|
style={{ maxWidth: 150 }}
|
|
|
|
{...rest}
|
|
|
|
>
|
|
|
|
{id ? (
|
2025-01-23 23:59:49 +08:00
|
|
|
<div className="w-full truncate text-ellipsis flex items-center gap-2 text-tertiary-300">
|
2024-12-30 08:26:40 +08:00
|
|
|
<IdcardOutlined className="text-primary" />
|
|
|
|
<span className="text-ellipsis truncate">{id}</span>
|
|
|
|
</div>
|
|
|
|
) : (
|
2025-01-23 23:59:49 +08:00
|
|
|
<span className="text-tertiary-300">未录入证件号</span>
|
2024-12-30 08:26:40 +08:00
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|