import React from 'react';
import classnames from 'classnames';
import PropTypes from 'prop-types';
import { useDrag } from 'react-dnd';
import { Icon } from '@ohif/ui';
const ThumbnailNoImage = ({
description,
seriesDate,
modality,
onClick,
dragData,
isActive,
}) => {
const [collectedProps, drag, dragPreview] = useDrag({
item: { ...dragData },
canDrag: function(monitor) {
return Object.keys(dragData).length !== 0;
},
});
return (
);
};
ThumbnailNoImage.propTypes = {
/**
* Data the thumbnail should expose to a receiving drop target. Use a matching
* `dragData.type` to identify which targets can receive this draggable item.
* If this is not set, drag-n-drop will be disabled for this thumbnail.
*
* Ref: https://react-dnd.github.io/react-dnd/docs/api/use-drag#specification-object-members
*/
dragData: PropTypes.shape({
/** Must match the "type" a dropTarget expects */
type: PropTypes.string.isRequired,
}),
description: PropTypes.string.isRequired,
modality: PropTypes.string.isRequired,
seriesDate: PropTypes.string.isRequired,
onClick: PropTypes.func.isRequired,
isActive: PropTypes.bool.isRequired,
};
export default ThumbnailNoImage;