Completely updated React, fixed #11, (hopefully)
This commit is contained in:
45
goTorrentWebUI/node_modules/material-ui/es/Dialog/DialogActions.js
generated
vendored
45
goTorrentWebUI/node_modules/material-ui/es/Dialog/DialogActions.js
generated
vendored
@@ -1,9 +1,7 @@
|
||||
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';
|
||||
import '../Button'; // So we don't have any override priority issue.
|
||||
@@ -30,15 +28,36 @@ function DialogActions(props) {
|
||||
|
||||
return React.createElement(
|
||||
'div',
|
||||
_extends({ 'data-mui-test': 'DialogActions', className: classNames(classes.root, className) }, other),
|
||||
React.Children.map(children, button => React.isValidElement(button) && React.createElement(
|
||||
'div',
|
||||
{ className: classes.action },
|
||||
React.cloneElement(button, {
|
||||
className: classNames(classes.button, button.props.className)
|
||||
})
|
||||
))
|
||||
_extends({ className: classNames(classes.root, className) }, other),
|
||||
React.Children.map(children, child => {
|
||||
if (!React.isValidElement(child)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return React.createElement(
|
||||
'div',
|
||||
{ className: classes.action },
|
||||
React.cloneElement(child, {
|
||||
className: classNames(classes.button, child.props.className)
|
||||
})
|
||||
);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
DialogActions.propTypes = process.env.NODE_ENV !== "production" ? {
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children: PropTypes.node,
|
||||
/**
|
||||
* Useful to extend the style applied to components.
|
||||
*/
|
||||
classes: PropTypes.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string
|
||||
} : {};
|
||||
|
||||
export default withStyles(styles, { name: 'MuiDialogActions' })(DialogActions);
|
Reference in New Issue
Block a user