Files
ohif-viewer/platform/ui/src/components/tableList/TableListItem.js
T
b9574b6efc fix: download tool fixes & improvements (#1235)
* 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>
2020-01-29 22:39:44 -05:00

46 lines
1.1 KiB
JavaScript

import './TableListItem.styl';
import { Component } from 'react';
import { Icon } from './../../elements/Icon';
import PropTypes from 'prop-types';
import React from 'react';
export class TableListItem extends Component {
static propTypes = {
children: PropTypes.node,
itemClass: PropTypes.string,
itemIndex: PropTypes.number,
itemKey: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
]),
onItemClick: PropTypes.func.isRequired,
};
render() {
return (
<div
className={`tableListItem ${this.props.itemClass}`}
onClick={this.onItemClick}
>
<div className="itemIndex">
{this.props.itemIndex}
<span className="warning-icon">
<Icon name="exclamation-triangle" />
</span>
</div>
<div className="itemContent">{this.props.children}</div>
</div>
);
}
onItemClick = event => {
if (this.props.onItemClick) {
event.preventDefault();
event.stopPropagation();
this.props.onItemClick(event, this.props.itemKey);
}
};
}