import React from 'react'
import ImageCard from '../ImageCard'
import './index.less'

/**
 * @desc 单列卡片
 * @param {boolean} active 是否选中
 * @param {function} click 回调
 * @param {node} children 卡片信息
 * @param {array} sourceData 卡片数据
 */
const BaseCard = props => {
  const {active,click,children,sourceData, className}=props
  return (
    <div
      className={`lm-base-card ${active ? "active" : ""} ${className}`}
      onClick={(e) => click && click(sourceData,e)}
    >
        <ImageCard {...props}/>
        {children}
    </div>
  )
}

export default BaseCard

