mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-21 05:19:42 +08:00
34 lines
863 B
JavaScript
34 lines
863 B
JavaScript
import './ProjectCard.scss';
|
|
import React, { Component } from 'react';
|
|
import { Card, Icon } from 'antd';
|
|
import { Link } from 'react-router-dom';
|
|
import PropTypes from 'prop-types';
|
|
|
|
class ProjectCard extends Component {
|
|
constructor(props) {
|
|
super(props);
|
|
}
|
|
|
|
static propTypes = {
|
|
projectData: PropTypes.object
|
|
}
|
|
|
|
render() {
|
|
const { projectData } = this.props;
|
|
return (
|
|
<Link to={`/project/${projectData._id}`}>
|
|
<Card bordered={false} bodyStyle={{padding: 16}} className="m-card">
|
|
<div className="m-card-logo">
|
|
<Icon type="area-chart" className="icon" />
|
|
<p className="name">{projectData.name || projectData.projectname}</p>
|
|
</div>
|
|
<div className="m-card-btns" style={{display: 'none'}}>btns</div>
|
|
</Card>
|
|
</Link>
|
|
)
|
|
}
|
|
|
|
}
|
|
|
|
export default ProjectCard
|