1 | import _extends from "@babel/runtime/helpers/esm/extends";
|
2 | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
3 | import * as React from 'react';
|
4 | import PropTypes from 'prop-types';
|
5 | import clsx from 'clsx';
|
6 | import withStyles from '../styles/withStyles';
|
7 | export const styles = {
|
8 |
|
9 | root: {
|
10 | display: 'flex',
|
11 | alignItems: 'center',
|
12 | padding: 8,
|
13 | justifyContent: 'flex-end'
|
14 | },
|
15 |
|
16 |
|
17 | spacing: {
|
18 | '& > :not(:first-child)': {
|
19 | marginLeft: 8
|
20 | }
|
21 | }
|
22 | };
|
23 | let warnedOnce = false;
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | const ExpansionPanelActions = React.forwardRef(function ExpansionPanelActions(props, ref) {
|
32 | if (process.env.NODE_ENV !== 'production') {
|
33 | if (!warnedOnce) {
|
34 | warnedOnce = true;
|
35 | console.error(['Material-UI: the ExpansionPanelActions component was renamed to AccordionActions to use a more common naming convention.', '', "You should use `import { AccordionActions } from '@material-ui/core'`", "or `import AccordionActions from '@material-ui/core/AccordionActions'`"].join('\n'));
|
36 | }
|
37 | }
|
38 |
|
39 | const {
|
40 | classes,
|
41 | className,
|
42 | disableSpacing = false
|
43 | } = props,
|
44 | other = _objectWithoutPropertiesLoose(props, ["classes", "className", "disableSpacing"]);
|
45 |
|
46 | return React.createElement("div", _extends({
|
47 | className: clsx(classes.root, className, !disableSpacing && classes.spacing),
|
48 | ref: ref
|
49 | }, other));
|
50 | });
|
51 | process.env.NODE_ENV !== "production" ? ExpansionPanelActions.propTypes = {
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 | |
58 |
|
59 |
|
60 | children: PropTypes.node,
|
61 |
|
62 | |
63 |
|
64 |
|
65 |
|
66 | classes: PropTypes.object,
|
67 |
|
68 | |
69 |
|
70 |
|
71 | className: PropTypes.string,
|
72 |
|
73 | |
74 |
|
75 |
|
76 | disableSpacing: PropTypes.bool
|
77 | } : void 0;
|
78 | export default withStyles(styles, {
|
79 | name: 'MuiExpansionPanelActions'
|
80 | })(ExpansionPanelActions); |
\ | No newline at end of file |