system-copyright-react/src/components/card/CardProjEdit.tsx

48 lines
1.9 KiB
TypeScript
Raw Normal View History

2024-03-14 23:34:40 +08:00
import './card-proj-edit.css';
2024-05-09 17:43:12 +08:00
import { EditStepEnum, IProjEdit } from "../../interfaces/card/ICardProj.ts";
import { useEffect } from 'react';
2024-03-15 18:18:29 +08:00
export default function CardProjEdit(props: IProjEdit) {
2024-05-09 17:43:12 +08:00
useEffect(()=>{
})
2024-03-21 22:22:35 +08:00
const renderBtn = () => {
if (props.canBtnClick == false) {
2024-05-09 17:43:12 +08:00
return <a href="/#" className="edit noEdit" style={{color: '#c2c2c2',textDecoration:'none'}} onClick={(e) => {
2024-03-21 22:22:35 +08:00
e.preventDefault();
}}>{props.btnName ? props.btnName : '编辑'}</a>
} else {
return <a href="/#" className="edit" onClick={(e) => {
e.preventDefault();
props.handleEdit();
}}>{props.btnName ? props.btnName : '编辑'}</a>
}
2024-05-09 17:43:12 +08:00
// if (props.canBtnClick == false) {
// return <a href="/#" className="edit" style={{ color: 'var(--color-border)' }} onClick={(e) => {
// e.preventDefault();
// }}>编辑</a>
// } else {
// return <a href="/#" className="edit" onClick={(e) => {
// e.preventDefault();
// props.handleEdit();
// }}>编辑</a>
// }
2024-03-21 22:22:35 +08:00
}
2024-03-14 23:34:40 +08:00
return (
2024-05-09 17:43:12 +08:00
// props.step === 1 ? 'complete-one' : props.step === 2 ? 'complete-two' : props.step === 3 ? 'complete-three' : props.step === 4 ? 'complete-four' : ''
<div className="card-proj-edit" style={{background:props.background,boxShadow:props.shadow}}>
{/* <div className={ }> */}
<div className='card-proj-edit-text'>
<div className="title">{props.title}</div>
<div className="desc">{props.desc}</div>
</div>
2024-03-14 23:34:40 +08:00
<div className="option">
2024-05-09 17:43:12 +08:00
{props.status == EditStepEnum.EDITED ? <span className="status"></span> : <div></div>}
2024-03-21 22:22:35 +08:00
{renderBtn()}
2024-05-09 17:43:12 +08:00
2024-03-14 23:34:40 +08:00
</div>
2024-05-09 17:43:12 +08:00
<div className='downBoxx'></div>
2024-03-14 23:34:40 +08:00
</div>
)
}