2019-01-07 01:25:33 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
import PropTypes from 'prop-types';
|
2017-01-03 20:56:50 +00:00
|
|
|
|
2017-02-24 22:47:32 +00:00
|
|
|
const ClickableTableRow = ({ children, className, onClick, onDoubleClick }) => {
|
2017-01-03 20:56:50 +00:00
|
|
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
2017-02-24 22:47:32 +00:00
|
|
|
return <tr className={className} onClick={onClick} onDoubleClick={onDoubleClick} tabIndex={-1}>{children}</tr>;
|
2017-01-03 20:56:50 +00:00
|
|
|
/* eslint-enable jsx-a11y/no-static-element-interactions */
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
ClickableTableRow.propTypes = {
|
|
|
|
|
children: PropTypes.node,
|
|
|
|
|
className: PropTypes.string,
|
|
|
|
|
onClick: PropTypes.func.isRequired,
|
2017-02-24 22:47:32 +00:00
|
|
|
onDoubleClick: PropTypes.func,
|
2017-01-03 20:56:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default ClickableTableRow;
|