* feat(Download ScreenShot Dialog) - UI part of it * feat(Download ScreenShot Dialog) - UI part of it * feat(Download ScreenShot Dialog) - Missing Annotations showing controls * feat(Download ScreenShot Dialog) - Missing Annotations showing controls * feat(Download ScreenShot Dialog) - Partial Pull Request - Not ready to Prod yet. * feat(Download ScreenShot Dialog) - UI - v2 * feat(Download ScreenShot Dialog) - UI - v3 * feat(Download ScreenShot Dialog) - Resizing tool * feat(Download ScreenShot Dialog) - Resizing tool * feat(Download ScreenShot Dialog) - Removing hardcoded CSS left * feat(Download ScreenShot Dialog) - Bugfixes * feat(Download ScreenShot Dialog) - Bugfixes - Escape closes the modal * feat(Download ScreenShot Dialog) - Bugfixes - Responsive issues * WIP: Refactoring DownloadDialog * WIP: Refactoring DownloadDialog * Align label and hide background canvas * Add constantes and remove code not used * Reset state on close modal * Extract cornerstone to connect * Fix modal zindex and add custom canvas classname * CR Update: Add proptypes and fix useeffect warning * CR Update: Refactor hooks, styles and imports * CR Update: Remove important from css * CR Update: Update core utils test of index
46 lines
922 B
JavaScript
46 lines
922 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
|
|
import './TextInput.css';
|
|
|
|
class TextInput extends React.Component {
|
|
constructor(props) {
|
|
super(props);
|
|
}
|
|
|
|
static propTypes = {
|
|
value: PropTypes.oneOfType([
|
|
PropTypes.string,
|
|
PropTypes.number
|
|
]),
|
|
id: PropTypes.string,
|
|
label:PropTypes.string,
|
|
type: PropTypes.string,
|
|
};
|
|
|
|
static defaultProps = {
|
|
value: '',
|
|
id: `TextInput-${new Date().toTimeString()}`,
|
|
label: undefined,
|
|
type: 'text',
|
|
};
|
|
|
|
render() {
|
|
return (
|
|
<div className="input-ohif-container">
|
|
<label className="input-ohif-label" htmlFor={this.props.id}>
|
|
{this.props.label}
|
|
<input
|
|
type={this.props.type}
|
|
id={this.props.id}
|
|
className="form-control input-ohif"
|
|
{...this.props}
|
|
/>
|
|
</label>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export { TextInput };
|