feat(components): 新增 CustomCard组件

master
钟良源 6 months ago
parent c5160a498e
commit f15a0dd0e6

@ -0,0 +1,25 @@
import React from 'react';
import { Card } from '@arco-design/web-react';
import style from './style/index.module.less';
interface CustomCardProps {
children: React.ReactNode;
hoverable?: boolean;
className?: string;
[key: string]: any; // 其余可支持属性参考文档https://arco.design/react/components/card
}
const CustomCard: React.FC<CustomCardProps> = ({ children, hoverable = true, className = '', ...restProps }) => {
return (
<Card
className={`${style['card-custom-hover-style']} ${className}`}
hoverable={hoverable}
{...restProps}
>
{children}
</Card>
);
};
export default CustomCard;

@ -0,0 +1,7 @@
.card-custom-hover-style {
transition-property: all;
}
.card-custom-hover-style:hover {
transform: translateY(-4px);
}
Loading…
Cancel
Save