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,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 { cloneChildrenWithClassName } from '../utils/reactHelpers';
@@ -13,9 +11,10 @@ export const styles = {
height: 52,
display: 'flex',
alignItems: 'center',
padding: '2px 4px'
padding: '2px 4px',
boxSizing: 'border-box'
},
actionSpacing: {
action: {
margin: '0 4px'
}
};
@@ -27,10 +26,29 @@ function CardActions(props) {
return React.createElement(
'div',
_extends({ className: classNames(classes.root, className) }, other),
disableActionSpacing ? children : cloneChildrenWithClassName(children, classes.actionSpacing)
disableActionSpacing ? children : cloneChildrenWithClassName(children, classes.action)
);
}
CardActions.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,
/**
* If `true`, the card actions do not have additional margin.
*/
disableActionSpacing: PropTypes.bool
} : {};
CardActions.defaultProps = {
disableActionSpacing: false
};