42 lines
825 B
Plaintext
42 lines
825 B
Plaintext
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
|
|
class TableFooter extends React.Component {
|
|
getChildContext() {
|
|
// eslint-disable-line class-methods-use-this
|
|
return {
|
|
table: {
|
|
footer: true,
|
|
},
|
|
};
|
|
}
|
|
|
|
render() {
|
|
const { component: Component, ...other } = this.props;
|
|
|
|
return <Component {...other} />;
|
|
}
|
|
}
|
|
|
|
TableFooter.propTypes = {
|
|
/**
|
|
* The content of the component, normally `TableRow`.
|
|
*/
|
|
children: PropTypes.node,
|
|
/**
|
|
* The component used for the root node.
|
|
* Either a string to use a DOM element or a component.
|
|
*/
|
|
component: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
};
|
|
|
|
TableFooter.defaultProps = {
|
|
component: 'tfoot',
|
|
};
|
|
|
|
TableFooter.childContextTypes = {
|
|
table: PropTypes.object,
|
|
};
|
|
|
|
export default TableFooter;
|