зеркало из https://github.com/mozilla/treeherder.git
24 строки
670 B
JavaScript
24 строки
670 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
|
|
import SortButton from './SortButton';
|
|
|
|
// eslint-disable-next-line react/prefer-stateless-function
|
|
export default class TableColumnHeader extends React.Component {
|
|
render() {
|
|
const { column, onChangeSort } = this.props;
|
|
const { name } = column;
|
|
return (
|
|
<div className="d-flex align-items-end pl-1 flex-nowrap">
|
|
<div>{name === 'Test name' ? '' : `${name}`}</div>
|
|
<SortButton column={column} onChangeSort={onChangeSort} />
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
TableColumnHeader.propTypes = {
|
|
column: PropTypes.shape({}).isRequired,
|
|
onChangeSort: PropTypes.func.isRequired,
|
|
};
|