web-backset.cn/apps/web-main/src/components/Card/index.tsx
2023-02-27 23:38:41 +08:00

44 lines
852 B
TypeScript

import { Card } from "@arco-design/web-react";
import { url } from "inspector";
import "./index.less";
const { Meta } = Card;
interface IProps {
imgUrl: string;
title: string;
desc: string;
action: string;
styles?: {};
}
function BsCard(props: IProps) {
return (
<Card
className="bs-card"
hoverable
style={{ ...props.styles }}
cover={
<div
className="cover"
style={{ backgroundImage: `url('${props.imgUrl}')` }}
>
<div className="mask">
<p>{props.title}</p>
</div>
</div>
}
>
<Meta
description={
<div className="bottom-des">
<span className="bs-ellipsis">{props.desc}</span>
<a>{props.action}</a>
</div>
}
/>
</Card>
);
}
export default BsCard;