mirror of https://github.com/usememos/memos
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
817 B
TypeScript
24 lines
817 B
TypeScript
import { getDateTimeString } from "@/helpers/datetime";
|
|
import ResourceIcon from "./ResourceIcon";
|
|
import "@/less/resource-card.less";
|
|
|
|
interface Props {
|
|
resource: Resource;
|
|
}
|
|
|
|
const ResourceCard = ({ resource }: Props) => {
|
|
return (
|
|
<div className="resource-card">
|
|
<div className="w-full flex flex-row justify-center items-center pb-2 pt-4 px-2">
|
|
<ResourceIcon resource={resource} strokeWidth={0.5} />
|
|
</div>
|
|
<div className="w-full flex flex-col justify-start items-center px-1 select-none">
|
|
<div className="w-full text-base text-center text-ellipsis overflow-hidden line-clamp-3">{resource.filename}</div>
|
|
<div className="text-xs text-gray-400 text-center">{getDateTimeString(resource.createdTs)}</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default ResourceCard;
|