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 | import Typography from '../Typography';
|
8 | export const styles = {
|
9 |
|
10 | root: {
|
11 | margin: 0,
|
12 | padding: '16px 24px',
|
13 | flex: '0 0 auto'
|
14 | }
|
15 | };
|
16 | const DialogTitle = React.forwardRef(function DialogTitle(props, ref) {
|
17 | const {
|
18 | children,
|
19 | classes,
|
20 | className,
|
21 | disableTypography = false
|
22 | } = props,
|
23 | other = _objectWithoutPropertiesLoose(props, ["children", "classes", "className", "disableTypography"]);
|
24 |
|
25 | return React.createElement("div", _extends({
|
26 | className: clsx(classes.root, className),
|
27 | ref: ref
|
28 | }, other), disableTypography ? children : React.createElement(Typography, {
|
29 | component: "h2",
|
30 | variant: "h6"
|
31 | }, children));
|
32 | });
|
33 | process.env.NODE_ENV !== "production" ? DialogTitle.propTypes = {
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 | |
40 |
|
41 |
|
42 | children: PropTypes.node,
|
43 |
|
44 | |
45 |
|
46 |
|
47 |
|
48 | classes: PropTypes.object,
|
49 |
|
50 | |
51 |
|
52 |
|
53 | className: PropTypes.string,
|
54 |
|
55 | |
56 |
|
57 |
|
58 |
|
59 | disableTypography: PropTypes.bool
|
60 | } : void 0;
|
61 | export default withStyles(styles, {
|
62 | name: 'MuiDialogTitle'
|
63 | })(DialogTitle); |
\ | No newline at end of file |