1 | import _extends from "@babel/runtime/helpers/esm/extends";
|
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
3 | import * as React from 'react';
|
4 | import PropTypes from 'prop-types';
|
5 | import clsx from 'clsx';
|
6 | import withStyles from '../styles/withStyles';
|
7 | export const styles = {
|
8 |
|
9 | root: {
|
10 | width: '100%',
|
11 | overflowX: 'auto'
|
12 | }
|
13 | };
|
14 | const TableContainer = React.forwardRef(function TableContainer(props, ref) {
|
15 | const {
|
16 | classes,
|
17 | className,
|
18 | component: Component = 'div'
|
19 | } = props,
|
20 | other = _objectWithoutPropertiesLoose(props, ["classes", "className", "component"]);
|
21 |
|
22 | return React.createElement(Component, _extends({
|
23 | ref: ref,
|
24 | className: clsx(classes.root, className)
|
25 | }, other));
|
26 | });
|
27 | process.env.NODE_ENV !== "production" ? TableContainer.propTypes = {
|
28 | |
29 |
|
30 |
|
31 | children: PropTypes.node,
|
32 |
|
33 | |
34 |
|
35 |
|
36 |
|
37 | classes: PropTypes.object.isRequired,
|
38 |
|
39 | |
40 |
|
41 |
|
42 | className: PropTypes.string,
|
43 |
|
44 | |
45 |
|
46 |
|
47 |
|
48 | component: PropTypes
|
49 |
|
50 | .elementType
|
51 | } : void 0;
|
52 | export default withStyles(styles, {
|
53 | name: 'MuiTableContainer'
|
54 | })(TableContainer); |
\ | No newline at end of file |