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 = theme => ({
|
8 |
|
9 | root: {
|
10 | flex: '1 1 auto',
|
11 | WebkitOverflowScrolling: 'touch',
|
12 |
|
13 | overflowY: 'auto',
|
14 | padding: '8px 24px',
|
15 | '&:first-child': {
|
16 |
|
17 | paddingTop: 20
|
18 | }
|
19 | },
|
20 |
|
21 |
|
22 | dividers: {
|
23 | padding: '16px 24px',
|
24 | borderTop: `1px solid ${theme.palette.divider}`,
|
25 | borderBottom: `1px solid ${theme.palette.divider}`
|
26 | }
|
27 | });
|
28 | const DialogContent = React.forwardRef(function DialogContent(props, ref) {
|
29 | const {
|
30 | classes,
|
31 | className,
|
32 | dividers = false
|
33 | } = props,
|
34 | other = _objectWithoutPropertiesLoose(props, ["classes", "className", "dividers"]);
|
35 |
|
36 | return React.createElement("div", _extends({
|
37 | className: clsx(classes.root, className, dividers && classes.dividers),
|
38 | ref: ref
|
39 | }, other));
|
40 | });
|
41 | process.env.NODE_ENV !== "production" ? DialogContent.propTypes = {
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 | |
48 |
|
49 |
|
50 | children: PropTypes.node,
|
51 |
|
52 | |
53 |
|
54 |
|
55 |
|
56 | classes: PropTypes.object,
|
57 |
|
58 | |
59 |
|
60 |
|
61 | className: PropTypes.string,
|
62 |
|
63 | |
64 |
|
65 |
|
66 | dividers: PropTypes.bool
|
67 | } : void 0;
|
68 | export default withStyles(styles, {
|
69 | name: 'MuiDialogContent'
|
70 | })(DialogContent); |
\ | No newline at end of file |