2017-09-20 12:00:42 +02:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* TableRow
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2017-09-26 16:36:28 +02:00
|
|
|
import React from 'react';
|
2017-09-20 12:00:42 +02:00
|
|
|
import PropTypes from 'prop-types';
|
2018-05-23 18:23:27 +02:00
|
|
|
import { FormattedMessage } from 'react-intl';
|
2017-09-20 12:00:42 +02:00
|
|
|
|
|
|
|
|
import styles from './styles.scss';
|
|
|
|
|
|
2018-05-23 18:23:27 +02:00
|
|
|
function TableEmpty({ colspan, contentType, filters }) {
|
|
|
|
|
const id = filters.length > 0 ? 'withFilters' : 'withoutFilter';
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<tr className={styles.tableEmpty}>
|
|
|
|
|
<td colSpan={colspan + 1}>
|
|
|
|
|
<FormattedMessage id={`content-manager.components.TableEmpty.${id}`} values={{ contentType: contentType || 'entry' }} />
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
);
|
2017-09-20 12:00:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TableEmpty.propTypes = {
|
|
|
|
|
colspan: PropTypes.number.isRequired,
|
|
|
|
|
contentType: PropTypes.string.isRequired,
|
2018-05-23 18:23:27 +02:00
|
|
|
filters: PropTypes.array.isRequired,
|
2017-09-20 12:00:42 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default TableEmpty;
|