import React, { useState, useEffect } from 'react'; import PropTypes from 'prop-types'; import { Range } from '@ohif/ui'; import './RTSettings.css'; const RTSettings = ({ configuration, onBack, onChange }) => { const toFloat = value => parseFloat(value / 100).toFixed(2); const save = (field, value) => { onChange({ ...configuration, [field]: value }); }; const SettingsSection = ({ title, children }) => { return (
{title}
{children}
); }; return (

RT Structure Set Settings

save('opacity', toFloat(event.target.value))} />
save('lineWidth', parseInt(event.target.value))} />
); }; RTSettings.propTypes = { configuration: PropTypes.shape({ lineWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired, opacity: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired, }).isRequired, onBack: PropTypes.func.isRequired, onChange: PropTypes.func.isRequired, }; export default RTSettings;