/**
 * V21 Card 卡片
 * 封装 Ant Design Card，应用 V21 设计系统样式
 */
import React from "react";
import { Card as AntCard } from "antd";
import type { CardProps as AntCardProps } from "antd";
import classNames from "classnames";
import "./ui.css";

export interface CardProps extends AntCardProps {
  /** 是否启用悬浮效果 */
  hover?: boolean;
}

const Card: React.FC<CardProps> = ({ className, hover, ...rest }) => {
  const v21Class = classNames(
    "xx-card-v21",
    hover && "xx-card-hover",
    className,
  );
  return <AntCard className={v21Class} {...rest} />;
};

export default Card;
