* fix: download tool fixes & improvements * fix filename error * Create variable to track erros * Fix small console error * Fix all conflicts and merge changes from latest master with this PR's improvements * Small improvement on select and textinput labels * Add new icon for unlink * Refactor on download image modal * Adding loading screen * Fix translation issue * Fixing aspect Ratio and E2E tests * Allow empty value without setting to 0 * Remove eslint comments * Fixing typos Co-authored-by: Gustavo André Lelis <galelis@gmail.com> Co-authored-by: Danny Brown <danny.ri.brown@gmail.com>
46 lines
935 B
JavaScript
46 lines
935 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">
|
|
{this.props.label && (
|
|
<label className="input-ohif-label" htmlFor={this.props.id}>{this.props.label}</label>
|
|
)}
|
|
<input
|
|
type={this.props.type}
|
|
id={this.props.id}
|
|
className="form-control input-ohif"
|
|
{...this.props}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export { TextInput };
|