import './card-proj-download.css';
import {IProjDownload} from "../../interfaces/card/ICardProj.ts";

export default function CardProjDownload(props: IProjDownload) {
    return (
        <div className="card-proj-download">
            <div className="title">{props.title}</div>
            <div className="desc">{props.desc}</div>
            <div className="option">
                {
                    props.canBtnClick ? (
                        <a href="/#" className="edit" onClick={(e) => {
                            e.preventDefault();
                            props.handleDownload();
                        }}>下载</a>
                    ) : (
                        <a href="/#" className="edit" style={{color: 'var(--color-border)'}} onClick={(e) => {
                            e.preventDefault();
                        }}>下载</a>
                    )
                }

            </div>
        </div>
    )
}