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