import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import { Icon, Thumbnail, Tooltip } from '@ohif/ui'; const ThumbnailTracked = ({ className, imageSrc, imageAltText, description, seriesNumber, numInstances, dragData, onClick, onClickUntrack, viewportIdentificator, isTracked, isActive, }) => { const trackedIcon = isTracked ? 'circled-checkmark' : 'dotted-circle'; return (
Series is tracked {viewportIdentificator && ( in viewport {viewportIdentificator} )}
} >
{viewportIdentificator}
{isTracked && (
)}
); }; ThumbnailTracked.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, }), className: PropTypes.string, imageSrc: PropTypes.string, imageAltText: PropTypes.string, description: PropTypes.string.isRequired, seriesNumber: PropTypes.number.isRequired, numInstances: PropTypes.number.isRequired, onClick: PropTypes.func.isRequired, onClickUntrack: PropTypes.func.isRequired, viewportIdentificator: PropTypes.string, isTracked: PropTypes.bool, isActive: PropTypes.bool.isRequired, }; export default ThumbnailTracked;