Completely updated React, fixed #11, (hopefully)

This commit is contained in:
2018-03-04 19:11:49 -05:00
parent 6e0afd6e2a
commit 34e5f5139a
13674 changed files with 333464 additions and 473223 deletions

View File

@@ -1,23 +1,8 @@
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 _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import withStyles from '../styles/withStyles';
export const styles = theme => ({
root: {
fontSize: theme.typography.pxToRem(12),
fontWeight: theme.typography.fontWeightMedium,
color: theme.palette.text.secondary
}
});
class TableHead extends React.Component {
getChildContext() {
// eslint-disable-line class-methods-use-this
return {
@@ -29,28 +14,31 @@ class TableHead 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);
{ component: Component } = _props,
other = _objectWithoutProperties(_props, ['component']);
return React.createElement(
ComponentProp,
_extends({ className: className }, other),
children
);
return React.createElement(Component, other);
}
}
TableHead.propTypes = process.env.NODE_ENV !== "production" ? {
/**
* The content of the component, normally `TableRow`.
*/
children: PropTypes.node.isRequired,
/**
* 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])
} : {};
TableHead.defaultProps = {
component: 'thead'
};
TableHead.childContextTypes = {
table: PropTypes.object
};
export default withStyles(styles, { name: 'MuiTableHead' })(TableHead);
export default TableHead;