material-ui-cordova
Version:
React components that implement Google's Material Design.
34 lines (27 loc) • 1.36 kB
JavaScript
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 React from 'react';
import classNames from 'classnames';
import withStyles from '../styles/withStyles';
import { cloneChildrenWithClassName } from '../utils/reactHelpers';
export const styles = theme => ({
root: {
display: 'flex',
justifyContent: 'flex-end',
alignItems: 'center',
padding: `${theme.spacing.unit * 2}px ${theme.spacing.unit}px`
},
action: {
marginLeft: theme.spacing.unit
}
});
function ExpansionPanelActions(props) {
const { children, classes, className } = props,
other = _objectWithoutProperties(props, ['children', 'classes', 'className']);
return React.createElement(
'div',
_extends({ className: classNames(classes.root, className) }, other),
cloneChildrenWithClassName(children, classes.action)
);
}
export default withStyles(styles, { name: 'MuiExpansionPanelActions' })(ExpansionPanelActions);