index.js 606 Bytes
Newer Older
zhanghaozhe committed
1 2
import React from "react"
import "./index.scss"
3 4

const VList = (props) => {
zhanghaozhe committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
  return (
    <li
      className="v-list-item"
      onClick={() => {
        typeof props.toDetail === "function" && props.toDetail(props.id)
      }}
    >
      <div className="content">
        <div className="cover">
          {props.status}
          {props.courseExpire}
          {props.toDetail ? (
            <img src={props.img} alt="" />
          ) : (
            <img src={props.img} alt="" />
          )}
        </div>
        {props.info}
      </div>
      {props.tab}
    </li>
  )
}
28

zhanghaozhe committed
29
export default VList