import React from 'react';
import './index.scss'

const VList = (props) => {
    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>
    );
};

export default VList;