index.js 485 Bytes
Newer Older
zhanghaozhe committed
1
import React from 'react'
xuzhenghua committed
2
import './course.scss'
zhanghaozhe committed
3
import {Link} from "react-router-dom"
xuzhenghua committed
4 5 6

const Course = (props) => {
    return (
zhanghaozhe committed
7
        <li className={`course-item ${props.className}`}>
xuzhenghua committed
8
            {props.top}
xuzhenghua committed
9
            <Link to={`/detail?id=${props.id}`}>
xuzhenghua committed
10
                <img src={props.img} alt=""/>
xuzhenghua committed
11
                <p className={`course-title ${props.className}`}>{props.title}</p>
xuzhenghua committed
12
            </Link>
xuzhenghua committed
13 14 15 16 17 18 19
            {props.bottom}
        </li>
    );
};

export default Course;