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 | const AccordionActions = React.forwardRef(function AccordionActions(props, ref) {
|
24 | const {
|
25 | classes,
|
26 | className,
|
27 | disableSpacing = false
|
28 | } = props,
|
29 | other = _objectWithoutPropertiesLoose(props, ["classes", "className", "disableSpacing"]);
|
30 |
|
31 | return React.createElement("div", _extends({
|
32 | className: clsx(classes.root, className, !disableSpacing && classes.spacing),
|
33 | ref: ref
|
34 | }, other));
|
35 | });
|
36 | process.env.NODE_ENV !== "production" ? AccordionActions.propTypes = {
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 | |
43 |
|
44 |
|
45 | children: PropTypes.node,
|
46 |
|
47 | |
48 |
|
49 |
|
50 |
|
51 | classes: PropTypes.object,
|
52 |
|
53 | |
54 |
|
55 |
|
56 | className: PropTypes.string,
|
57 |
|
58 | |
59 |
|
60 |
|
61 | disableSpacing: PropTypes.bool
|
62 | } : void 0;
|
63 | export default withStyles(styles, {
|
64 | name: 'MuiAccordionActions'
|
65 | })(AccordionActions); |
\ | No newline at end of file |