import React from 'react'; import PropTypes from 'prop-types'; import { MeasurementTable } from '@ohif/ui'; const MeasurementsPanel = ({ descriptionData, measurementTableData, actionButtons, }) => { const { date, modality, description } = descriptionData; return ( <>
{date} {modality}
{description}
{actionButtons}
); }; MeasurementsPanel.defaultProps = { actionButtons: null, }; MeasurementsPanel.propTypes = { descriptionData: PropTypes.shape({ date: PropTypes.string, modality: PropTypes.string, description: PropTypes.string, }).isRequired, measurementTableData: PropTypes.shape({ title: PropTypes.string, amount: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), data: PropTypes.arrayOf( PropTypes.shape({ id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), label: PropTypes.string, displayText: PropTypes.string, isActive: PropTypes.bool, }) ), onClick: PropTypes.func, onEdit: PropTypes.func, }).isRequired, actionButtons: PropTypes.node, }; export default MeasurementsPanel;