| | |
| | | import ItemTypes from './itemtypes' |
| | | import './index.scss' |
| | | |
| | | const Card = ({ id, icon, text, moveCard, findCard, editCard, closeCard }) => { |
| | | const Card = ({ id, icon, text, menutype, moveCard, findCard, editCard, closeCard }) => { |
| | | const originalIndex = findCard(id).index |
| | | const [{ isDragging }, drag] = useDrag({ |
| | | item: { type: ItemTypes.CARD, id, originalIndex }, |
| | |
| | | {icon && <Icon type={icon} />} |
| | | {text} |
| | | </div> |
| | | <Icon className="edit" type="edit" onClick={edit} /> |
| | | {menutype !== 'iframe' ? <Icon className="edit" type="edit" onClick={edit} /> : null} |
| | | <Icon className="close" type="close" onClick={close} /> |
| | | </div> |
| | | ) |