UNPKG

2.65 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 AccordionActions = /*#__PURE__*/React.forwardRef(function AccordionActions(props, ref) {
42 var classes = props.classes,
43 className = props.className,
44 _props$disableSpacing = props.disableSpacing,
45 disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,
46 other = (0, _objectWithoutProperties2.default)(props, ["classes", "className", "disableSpacing"]);
47 return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
48 className: (0, _clsx.default)(classes.root, className, !disableSpacing && classes.spacing),
49 ref: ref
50 }, other));
51});
52process.env.NODE_ENV !== "production" ? AccordionActions.propTypes = {
53 // ----------------------------- Warning --------------------------------
54 // | These PropTypes are generated from the TypeScript type definitions |
55 // | To update them edit the d.ts file and run "yarn proptypes" |
56 // ----------------------------------------------------------------------
57
58 /**
59 * The content of the component.
60 */
61 children: _propTypes.default.node,
62
63 /**
64 * Override or extend the styles applied to the component.
65 * See [CSS API](#css) below for more details.
66 */
67 classes: _propTypes.default.object,
68
69 /**
70 * @ignore
71 */
72 className: _propTypes.default.string,
73
74 /**
75 * If `true`, the actions do not have additional margin.
76 */
77 disableSpacing: _propTypes.default.bool
78} : void 0;
79
80var _default = (0, _withStyles.default)(styles, {
81 name: 'MuiAccordionActions'
82})(AccordionActions);
83
84exports.default = _default;
\No newline at end of file