| | |
| | | |
| | | const { MonthPicker, WeekPicker, RangePicker } = DatePicker |
| | | |
| | | const Card = ({ id, type, card, moveCard, findCard, editCard, copyCard, hasDrop }) => { |
| | | const Card = ({ id, type, card, moveCard, findCard, editCard, delCard, copyCard, hasDrop }) => { |
| | | const originalIndex = findCard(id).index |
| | | const [{ isDragging }, drag] = useDrag({ |
| | | item: { type: ItemTypes[type], id, originalIndex }, |
| | |
| | | |
| | | const edit = () => { |
| | | editCard(id) |
| | | } |
| | | |
| | | const del = () => { |
| | | delCard(id) |
| | | } |
| | | |
| | | const copy = () => { |
| | |
| | | } |
| | | </div> |
| | | <Icon className="edit" type="edit" onClick={edit} /> |
| | | <Icon className="edit close" type="close" onClick={del} /> |
| | | {type === 'action' && <Icon className="edit copy" type="copy" onClick={copy} />} |
| | | </div> |
| | | ) |