Completely updated React, fixed #11, (hopefully)
This commit is contained in:
45
goTorrentWebUI/node_modules/material-ui/es/Table/Table.js
generated
vendored
45
goTorrentWebUI/node_modules/material-ui/es/Table/Table.js
generated
vendored
@@ -1,9 +1,6 @@
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||||
|
||||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
||||
|
||||
import _extends from 'babel-runtime/helpers/extends';
|
||||
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
|
||||
import React from 'react';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import withStyles from '../styles/withStyles';
|
||||
@@ -19,7 +16,6 @@ export const styles = theme => ({
|
||||
});
|
||||
|
||||
class Table extends React.Component {
|
||||
|
||||
getChildContext() {
|
||||
// eslint-disable-line class-methods-use-this
|
||||
return {
|
||||
@@ -29,26 +25,37 @@ class Table extends React.Component {
|
||||
|
||||
render() {
|
||||
const _props = this.props,
|
||||
{
|
||||
classes,
|
||||
className: classNameProp,
|
||||
children,
|
||||
component: ComponentProp
|
||||
} = _props,
|
||||
other = _objectWithoutProperties(_props, ['classes', 'className', 'children', 'component']);
|
||||
const className = classNames(classes.root, classNameProp);
|
||||
{ classes, className: classNameProp, component: Component } = _props,
|
||||
other = _objectWithoutProperties(_props, ['classes', 'className', 'component']);
|
||||
|
||||
return React.createElement(
|
||||
ComponentProp,
|
||||
_extends({ className: className }, other),
|
||||
children
|
||||
);
|
||||
return React.createElement(Component, _extends({ className: classNames(classes.root, classNameProp) }, other));
|
||||
}
|
||||
}
|
||||
|
||||
Table.propTypes = process.env.NODE_ENV !== "production" ? {
|
||||
/**
|
||||
* The content of the table, normally `TableHeader` and `TableBody`.
|
||||
*/
|
||||
children: PropTypes.node.isRequired,
|
||||
/**
|
||||
* Useful to extend the style applied to components.
|
||||
*/
|
||||
classes: PropTypes.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* 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])
|
||||
} : {};
|
||||
|
||||
Table.defaultProps = {
|
||||
component: 'table'
|
||||
};
|
||||
|
||||
Table.childContextTypes = {
|
||||
table: PropTypes.object
|
||||
};
|
||||
|
Reference in New Issue
Block a user