UNPKG

3.39 kBJavaScriptView Raw
1"use strict";
2
3var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
4
5var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
7Object.defineProperty(exports, "__esModule", {
8 value: true
9});
10exports.default = exports.styles = void 0;
11
12var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
14var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
15
16var React = _interopRequireWildcard(require("react"));
17
18var _propTypes = _interopRequireDefault(require("prop-types"));
19
20var _clsx = _interopRequireDefault(require("clsx"));
21
22var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
23
24var styles = {
25 /* Styles applied to the root element. */
26 root: {
27 display: 'flex',
28 alignItems: 'center',
29 padding: 8,
30 justifyContent: 'flex-end'
31 },
32
33 /* Styles applied to the root element if `disableSpacing={false}`. */
34 spacing: {
35 '& > :not(:first-child)': {
36 marginLeft: 8
37 }
38 }
39};
40exports.styles = styles;
41var warnedOnce = false;
42/**
43 * ⚠️ The ExpansionPanelActions component was renamed to AccordionActions to use a more common naming convention.
44 *
45 * You should use `import { AccordionActions } from '@material-ui/core'`
46 * or `import AccordionActions from '@material-ui/core/AccordionActions'`.
47 */
48
49var ExpansionPanelActions = /*#__PURE__*/React.forwardRef(function ExpansionPanelActions(props, ref) {
50 if (process.env.NODE_ENV !== 'production') {
51 if (!warnedOnce) {
52 warnedOnce = true;
53 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'));
54 }
55 }
56
57 var classes = props.classes,
58 className = props.className,
59 _props$disableSpacing = props.disableSpacing,
60 disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,
61 other = (0, _objectWithoutProperties2.default)(props, ["classes", "className", "disableSpacing"]);
62 return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
63 className: (0, _clsx.default)(classes.root, className, !disableSpacing && classes.spacing),
64 ref: ref
65 }, other));
66});
67process.env.NODE_ENV !== "production" ? ExpansionPanelActions.propTypes = {
68 // ----------------------------- Warning --------------------------------
69 // | These PropTypes are generated from the TypeScript type definitions |
70 // | To update them edit the d.ts file and run "yarn proptypes" |
71 // ----------------------------------------------------------------------
72
73 /**
74 * The content of the component.
75 */
76 children: _propTypes.default.node,
77
78 /**
79 * Override or extend the styles applied to the component.
80 * See [CSS API](#css) below for more details.
81 */
82 classes: _propTypes.default.object,
83
84 /**
85 * @ignore
86 */
87 className: _propTypes.default.string,
88
89 /**
90 * If `true`, the actions do not have additional margin.
91 */
92 disableSpacing: _propTypes.default.bool
93} : void 0;
94
95var _default = (0, _withStyles.default)(styles, {
96 name: 'MuiExpansionPanelActions'
97})(ExpansionPanelActions);
98
99exports.default = _default;
\No newline at end of file