Commit ee667147 by zhanghaozhe

添加分类标签组件

parent 66fedc0a
...@@ -6,4 +6,6 @@ const Tag = (props) => { ...@@ -6,4 +6,6 @@ const Tag = (props) => {
{props.children} {props.children}
</span> </span>
) )
} }
\ No newline at end of file
export default Tag
\ No newline at end of file
.state { .state {
box-sizing: border-box;
border-radius: 0 10px 10px 0;
padding: 1px 5px;
} }
\ No newline at end of file
...@@ -5,3 +5,4 @@ export { default as Course } from './Course' // 课程状态(试听 正在 ...@@ -5,3 +5,4 @@ export { default as Course } from './Course' // 课程状态(试听 正在
export { default as Carousel } from './Carousel' // 横向滚动 export { default as Carousel } from './Carousel' // 横向滚动
export { default as Topscroll } from './Topscroll' // 首页头部轮播 export { default as Topscroll } from './Topscroll' // 首页头部轮播
export { default as Scroll } from './Scroll' // 首页正常轮播图 export { default as Scroll } from './Scroll' // 首页正常轮播图
export { default as Tag } from './CategoryTag'
import React from 'react' import React from 'react'
import { Course } from '../../../common' import { Course, Tag } from '../../../common'
import './free-courses.scss' import './free-courses.scss'
...@@ -79,14 +79,6 @@ const mockData = [ ...@@ -79,14 +79,6 @@ const mockData = [
}, },
] ]
const Tag = (props) => {
return (
<span className={`state ${props.className}`}>
{props.children}
</span>
)
}
const Bottom = (props) => ( const Bottom = (props) => (
<div className='bottom'> <div className='bottom'>
<Tag className={props.className}>{props.tagText}</Tag> <Tag className={props.className}>{props.tagText}</Tag>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment