UNPKG

3.07 kBJavaScriptView Raw
1'use client';
2
3import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4import _extends from "@babel/runtime/helpers/esm/extends";
5import * as React from 'react';
6import PropTypes from 'prop-types';
7import clsx from 'clsx';
8import composeClasses from '@mui/utils/composeClasses';
9import styled, { rootShouldForwardProp } from '../styles/styled';
10import { useDefaultProps } from '../DefaultPropsProvider';
11import Typography from '../Typography';
12import { getDialogContentTextUtilityClass } from './dialogContentTextClasses';
13import { jsx as _jsx } from "react/jsx-runtime";
14var useUtilityClasses = function useUtilityClasses(ownerState) {
15 var classes = ownerState.classes;
16 var slots = {
17 root: ['root']
18 };
19 var composedClasses = composeClasses(slots, getDialogContentTextUtilityClass, classes);
20 return _extends({}, classes, composedClasses);
21};
22var DialogContentTextRoot = styled(Typography, {
23 shouldForwardProp: function shouldForwardProp(prop) {
24 return rootShouldForwardProp(prop) || prop === 'classes';
25 },
26 name: 'MuiDialogContentText',
27 slot: 'Root',
28 overridesResolver: function overridesResolver(props, styles) {
29 return styles.root;
30 }
31})({});
32var DialogContentText = /*#__PURE__*/React.forwardRef(function DialogContentText(inProps, ref) {
33 var props = useDefaultProps({
34 props: inProps,
35 name: 'MuiDialogContentText'
36 });
37 var children = props.children,
38 className = props.className,
39 ownerState = _objectWithoutProperties(props, ["children", "className"]);
40 var classes = useUtilityClasses(ownerState);
41 return /*#__PURE__*/_jsx(DialogContentTextRoot, _extends({
42 component: "p",
43 variant: "body1",
44 color: "text.secondary",
45 ref: ref,
46 ownerState: ownerState,
47 className: clsx(classes.root, className)
48 }, props, {
49 classes: classes
50 }));
51});
52process.env.NODE_ENV !== "production" ? DialogContentText.propTypes /* remove-proptypes */ = {
53 // ┌────────────────────────────── Warning ──────────────────────────────┐
54 // │ These PropTypes are generated from the TypeScript type definitions. │
55 // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
56 // └─────────────────────────────────────────────────────────────────────┘
57 /**
58 * The content of the component.
59 */
60 children: PropTypes.node,
61 /**
62 * Override or extend the styles applied to the component.
63 */
64 classes: PropTypes.object,
65 /**
66 * @ignore
67 */
68 className: PropTypes.string,
69 /**
70 * The system prop that allows defining system overrides as well as additional CSS styles.
71 */
72 sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
73} : void 0;
74export default DialogContentText;
\No newline at end of file